electrum

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

commit 5480b7dff50eaac8a10af9fc7d17c8e0a6f410c9
parent 332c5d41e604e3ab75eca0cf6ebf6ac1d4bcc1d6
Author: ThomasV <thomasv@electrum.org>
Date:   Sat,  7 Oct 2017 12:54:50 +0200

add_input_info: add txin value for RBF with segwit inputs

Diffstat:
Mlib/wallet.py | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/lib/wallet.py b/lib/wallet.py @@ -1073,6 +1073,12 @@ class Abstract_Wallet(PrintError): address = txin['address'] if self.is_mine(address): txin['type'] = self.get_txin_type(address) + # segwit needs value to sign + if txin.get('value') is None and txin['type'] in ['p2wpkh', 'p2wsh', 'p2wpkh-p2sh', 'p2wsh-p2sh']: + received, spent = self.get_addr_io(address) + item = received.get(txin['prevout_hash']+':%d'%txin['prevout_n']) + tx_height, value, is_cb = item + txin['value'] = value self.add_input_sig_info(txin, address) def can_sign(self, tx):