Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
forrestv committed Mar 19, 2014
1 parent 35f06e8 commit 9a73260
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions p2pool/bitcoin/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,12 @@ def pubkey_to_address(pubkey, net):

def address_to_pubkey_hash(address, net):
x = human_address_type.unpack(base58_decode(address))
if x['version'] != net.ADDRESS_VERSION:
raise ValueError('address not for this net!')
return x['pubkey_hash']
if x['version'] == net.ADDRESS_VERSION:
return x['pubkey_hash']
elif x['version'] == net.ADDRESS_VERSION + 5:
return x['pubkey_hash'] # XXX script hash - handle specially
else:
raise ValueError('address not for this net! %r' % (address,))

# transactions

Expand Down

0 comments on commit 9a73260

Please sign in to comment.