electrum

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

commit c72123d708e3dc03f11246704b49a156b6b69682
parent e0635f5d08497f9bd467ac855fc736435b1a9de8
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 11 Oct 2017 01:04:46 +0200

fix #3014

Diffstat:
Mlib/transaction.py | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/transaction.py b/lib/transaction.py @@ -429,6 +429,8 @@ def parse_input(vds): def parse_witness(vds, txin): n = vds.read_compact_size() if n == 0: + return + if n == 0xffffffff: txin['value'] = vds.read_uint64() n = vds.read_compact_size() w = list(bh2u(vds.read_bytes(vds.read_compact_size())) for i in range(n)) @@ -644,7 +646,7 @@ class Transaction: witness = var_int(n) + '00' + ''.join(var_int(len(x)//2) + x for x in sig_list) + var_int(len(witness_script)//2) + witness_script else: raise BaseException('wrong txin type') - value_field = '' if self.is_txin_complete(txin) else var_int(0) + int_to_hex(txin['value'], 8) + value_field = '' if self.is_txin_complete(txin) else var_int(0xffffffff) + int_to_hex(txin['value'], 8) return value_field + witness @classmethod