electrum

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

commit 2c6925e526d04626fbad72bc33884f205a0d14ff
parent e23e0d6c6e6e419bd6c467478845e9e3403a1674
Author: Janus <ysangkok@gmail.com>
Date:   Tue, 25 Sep 2018 18:04:00 +0200

lnhtlc: bip69 ordering of htlc signatues we generate

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

diff --git 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