vbuterin / pybitcointools

SImple, common-sense Bitcoin-themed Python ECC library
1.28k stars 857 forks source link

script_to_address method fails with dogecoin p2sh #106

Closed mflaxman closed 8 years ago

mflaxman commented 8 years ago

This BTC p2sh transaction works fine:

>>> script_to_address('a914e32b88faeb7ce3e5d56d279ca7fac2ff47181bb587', vbyte=5)
'3NQBTxcD8jCQn4sSrs44NqF3q3htFMCgBf'

However, this DOGE p2sh transaction fails:

>>> script_to_address('a91467dbc5109dec5bf662df10378e91100cf3beeacb87', vbyte=22)
'3BAAoB5irPfTYzVSJXays7JzLVLE9o39Y2'

Besides being the incorrect value, it's also an impossible value. Dogecoin addresses can't start with a 3. The correct address here should be A1uRY29cvTYMTMruifFQ7EwN34iGDDpe7X