Skip to content

Commit

Permalink
Merge #213: Fix error message for invalid P2WSH scriptPubKey.
Browse files Browse the repository at this point in the history
70ce3b3 Fix error message for invalid P2WSH scriptPubKey. (Jonathan Zernik)

Pull request description:

  The error message should say 'not a P2WPKH scriptPubKey'

Tree-SHA512: 661080a7a5832701803f86d707921c3d504173a24445296e35e6da785f25330839f77f854d7c4db3b7674d38623d67b2bb686ea1590c0b83877b9b98035b1726
  • Loading branch information
petertodd committed Oct 16, 2019
2 parents 0c6d484 + 70ce3b3 commit ebc85bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bitcoin/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def from_scriptPubKey(cls, scriptPubKey):
if scriptPubKey.is_witness_v0_keyhash():
return cls.from_bytes(0, scriptPubKey[2:22])
else:
raise CBitcoinAddressError('not a P2WSH scriptPubKey')
raise CBitcoinAddressError('not a P2WPKH scriptPubKey')

def to_scriptPubKey(self):
"""Convert an address to a scriptPubKey"""
Expand Down

0 comments on commit ebc85bf

Please sign in to comment.