diff --git a/lib/bitcoin.py b/lib/bitcoin.py index 67c36fd9d..c4e111bd9 100644 --- a/lib/bitcoin.py +++ b/lib/bitcoin.py @@ -606,7 +606,6 @@ class Transaction: # add pubkeys txin["pubkeys"] = redeem_pubkeys - # get list of already existing signatures signatures = txin.get("signatures",[]) # continue if this txin is complete @@ -627,9 +626,9 @@ class Transaction: sig = private_key.sign_digest( Hash( tx_for_sig.decode('hex') ), sigencode = ecdsa.util.sigencode_der ) assert public_key.verify_digest( sig, Hash( tx_for_sig.decode('hex') ), sigdecode = ecdsa.util.sigdecode_der) signatures.append( sig.encode('hex') ) + print_error("adding signature for", pubkey) txin["signatures"] = signatures - print_error("signatures", signatures) is_complete = is_complete and len(signatures) == num self.is_complete = is_complete diff --git a/lib/deserialize.py b/lib/deserialize.py index 85ab97c48..9af5fe077 100644 --- a/lib/deserialize.py +++ b/lib/deserialize.py @@ -346,8 +346,8 @@ def get_address_from_input_script(bytes): redeemScript = decoded[-1][1] num = len(match) - 2 - signatures = map(lambda x:x[1].encode('hex'), decoded[1:-1]) - + signatures = map(lambda x:x[1][:-1].encode('hex'), decoded[1:-1]) + dec2 = [ x for x in script_GetOp(redeemScript) ] # 2 of 2