tfix #651 - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit d30d7b2188063a157967feb81cfea8915a79ea6e DIR parent 9df44b84766700e8e338e099da9d9d4d80343dff HTML Author: ThomasV <thomasv@gitorious> Date: Sat, 12 Apr 2014 19:53:52 +0200 fix #651 Diffstat: M lib/transaction.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- DIR diff --git a/lib/transaction.py b/lib/transaction.py t@@ -428,8 +428,11 @@ class Transaction: s += txin['prevout_hash'].decode('hex')[::-1].encode('hex') # prev hash s += int_to_hex(txin['prevout_n'],4) # prev index - if for_sig is None: - signatures = txin['signatures'] + signatures = txin.get('signatures', {}) + if for_sig is None and not signatures: + script = '' + + elif for_sig is None: pubkeys = txin['pubkeys'] sig_list = '' for pubkey in pubkeys: t@@ -455,7 +458,7 @@ class Transaction: else: script = txin['scriptPubKey'] # scriptsig else: - script='' + script = '' s += var_int( len(script)/2 ) # script length s += script s += "ffffffff" # sequence