From a7a4fa92e6cf27cffbd97628d92e2b2510040e9e Mon Sep 17 00:00:00 2001 From: Janus Date: Tue, 25 Sep 2018 18:04:00 +0200 Subject: [PATCH] lnhtlc: bip69 ordering of htlc signatues we generate --- electrum/lnhtlc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electrum/lnhtlc.py b/electrum/lnhtlc.py index ba8bbfdf4..9883e629b 100644 --- a/electrum/lnhtlc.py +++ b/electrum/lnhtlc.py @@ -273,7 +273,7 @@ class HTLCStateMachine(PrintError): htlc_tx = make_htlc_tx_with_open_channel(self, *args) sig = bfh(htlc_tx.sign_txin(0, their_remote_htlc_privkey)) 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: if pending_fee.is_proposed(): @@ -286,6 +286,7 @@ class HTLCStateMachine(PrintError): self.lnwatcher.process_new_offchain_ctx(self, pending_remote_commitment, ours=False) htlcsigs.sort() + htlcsigs = [x[1] for x in htlcsigs] return sig_64, htlcsigs