It was possible to create p2sh address with data size != 20 (fixed in https://github.com/Simplexum/python-bitcointx/commit/8c106682049f910cd2765b1cc45ba4cbd68636f1) It should have been catched by tests.