Browse Source

lnbase: fix signature index

regtest_lnd
ThomasV 7 years ago
committed by SomberNight
parent
commit
255b8eb914
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 3
      lib/lnbase.py

3
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())

Loading…
Cancel
Save