Browse Source

lnhtlc: bip69 ordering of htlc signatues we generate

regtest_lnd
Janus 6 years ago
committed by SomberNight
parent
commit
a7a4fa92e6
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 3
      electrum/lnhtlc.py

3
electrum/lnhtlc.py

@ -273,7 +273,7 @@ class HTLCStateMachine(PrintError):
htlc_tx = make_htlc_tx_with_open_channel(self, *args) htlc_tx = make_htlc_tx_with_open_channel(self, *args)
sig = bfh(htlc_tx.sign_txin(0, their_remote_htlc_privkey)) sig = bfh(htlc_tx.sign_txin(0, their_remote_htlc_privkey))
htlc_sig = ecc.sig_string_from_der_sig(sig[:-1]) htlc_sig = ecc.sig_string_from_der_sig(sig[:-1])
htlcsigs.append(htlc_sig) htlcsigs.append((pending_remote_commitment.htlc_output_indices[htlc.payment_hash], htlc_sig))
for pending_fee in self.fee_mgr: for pending_fee in self.fee_mgr:
if pending_fee.is_proposed(): if pending_fee.is_proposed():
@ -286,6 +286,7 @@ class HTLCStateMachine(PrintError):
self.lnwatcher.process_new_offchain_ctx(self, pending_remote_commitment, ours=False) self.lnwatcher.process_new_offchain_ctx(self, pending_remote_commitment, ours=False)
htlcsigs.sort() htlcsigs.sort()
htlcsigs = [x[1] for x in htlcsigs]
return sig_64, htlcsigs return sig_64, htlcsigs

Loading…
Cancel
Save