electrum

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

commit 52ae63990ff9c3af19c10256cbfdebb9de776937
parent ba997951317ecb3b2274ff8c3ed78468a3265c5d
Author: ThomasV <thomasv@electrum.org>
Date:   Fri, 13 Apr 2018 12:28:13 +0200

lnbase: fix signature index

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

diff --git a/lib/lnbase.py b/lib/lnbase.py @@ -448,7 +448,8 @@ class Peer(PrintError): c_tx.sign({bh2u(funding_pubkey): (funding_privkey, True)}) # self.print_error('ctx inputs', c_tx.inputs()) - sig = bytes.fromhex(c_tx.inputs()[0]["signatures"][0]) + sig_index = pubkeys.index(bh2u(funding_pubkey)) + sig = bytes.fromhex(c_tx.inputs()[0]["signatures"][sig_index]) self.print_error('sig', len(sig)) sig = bytes(sig[:len(sig)-1]) r, s = sigdecode_der(sig, SECP256k1.generator.order())