Browse Source

fix for non-p2sh addresses

283
ThomasV 12 years ago
parent
commit
c019428b02
  1. 14
      lib/account.py
  2. 2
      lib/bitcoin.py

14
lib/account.py

@ -171,19 +171,9 @@ class BIP32_Account(Account):
K, K_compressed, chain = CKD_prime(K, chain, i) K, K_compressed, chain = CKD_prime(K, chain, i)
return K_compressed.encode('hex') return K_compressed.encode('hex')
def redeem_script(self, sequence):
return None
def get_private_keys(self, sequence_list, seed):
return [ self.get_private_key( sequence, seed) for sequence in sequence_list]
def check_seed(self, seed):
master_secret, master_chain, master_public_key, master_public_key_compressed = bip32_init(seed)
assert self.mpk == (master_public_key.encode('hex'), master_chain.encode('hex'))
def get_input_info(self, sequence):
chain, i = sequence
pk_addr = self.get_address(chain, i)
redeemScript = None
return pk_addr, redeemScript

2
lib/bitcoin.py

@ -642,7 +642,7 @@ class Transaction:
is_complete = is_complete and (len(signatures) == num) is_complete = is_complete and (len(signatures) == num)
else: else:
sec = private_keys[txin['address']] sec = private_keys[txin['address']][0]
compressed = is_compressed(sec) compressed = is_compressed(sec)
pkey = regenerate_key(sec) pkey = regenerate_key(sec)
secexp = pkey.secret secexp = pkey.secret

Loading…
Cancel
Save