electrum

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

commit 7ea2cb41e88ba2ef9f1bacc2059b637b9702e192
parent a7679debd1bc75639d5b53b6fbbe8feb583d681d
Author: ThomasV <thomasv@electrum.org>
Date:   Fri, 30 Jun 2017 18:31:37 +0200

fix #2509: reset pubkeys to None when x_pubkeys are unsorted

Diffstat:
Mlib/wallet.py | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/wallet.py b/lib/wallet.py @@ -1730,9 +1730,13 @@ class Multisig_Wallet(Deterministic_Wallet, P2SH): return ''.join(sorted(self.get_master_public_keys())) def add_input_sig_info(self, txin, address): - derivation = self.get_address_index(address) - # extended pubkeys - txin['x_pubkeys'] = [k.get_xpubkey(*derivation) for k in self.get_keystores()] + # x_pubkeys are not sorted here because it would be too slow + # they are sorted in transaction.get_sorted_pubkeys + # pubkeys is set to None to signal that x_pubkeys are unsorted + if txin.get('x_pubkeys') is None: + derivation = self.get_address_index(address) + txin['x_pubkeys'] = [k.get_xpubkey(*derivation) for k in self.get_keystores()] + txin['pubkeys'] = None # we need n place holders txin['signatures'] = [None] * self.n txin['num_sig'] = self.m