electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit d30d7b2188063a157967feb81cfea8915a79ea6e
parent 9df44b84766700e8e338e099da9d9d4d80343dff
Author: ThomasV <thomasv@gitorious>
Date:   Sat, 12 Apr 2014 19:53:52 +0200

fix #651

Diffstat:
Mlib/transaction.py | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/transaction.py b/lib/transaction.py @@ -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: @@ -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