do not crash tx.serialize if pubkeys are missing. fix #2113

This commit is contained in:
ThomasV 2017-01-16 10:06:28 +01:00
parent d0755698ce
commit 25e4116393
1 changed files with 3 additions and 1 deletions

View File

@ -584,7 +584,9 @@ class Transaction:
pubkeys = txin['x_pubkeys']
sig_list = ((sig + '01') if sig else NO_SIGNATURE for sig in x_signatures)
script = ''.join(push_script(x) for x in sig_list)
if not p2sh:
if not pubkeys:
pass
elif not p2sh:
x_pubkey = pubkeys[0]
if x_pubkey is None:
addrtype, h160 = bc_address_to_hash_160(txin['address'])