From 0967961ab898c7975f2aff7838bbb6015309b4b4 Mon Sep 17 00:00:00 2001 From: Chris Waterson Date: Wed, 25 Oct 2023 11:13:23 -0700 Subject: [PATCH] Use the per-commitment point from the trusted_tx --- lightning/src/chain/onchaintx.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lightning/src/chain/onchaintx.rs b/lightning/src/chain/onchaintx.rs index 5e892fe7b..65178e952 100644 --- a/lightning/src/chain/onchaintx.rs +++ b/lightning/src/chain/onchaintx.rs @@ -1167,15 +1167,10 @@ impl OnchainTxHandler .map(|(htlc_idx, htlc)| { let counterparty_htlc_sig = holder_commitment.counterparty_htlc_sigs[htlc_idx]; - // TODO(waterson) fallible: move this somewhere! - let per_commitment_point = self.signer.get_per_commitment_point( - trusted_tx.commitment_number(), &self.secp_ctx, - ).unwrap(); - ExternalHTLCClaim { commitment_txid: trusted_tx.txid(), per_commitment_number: trusted_tx.commitment_number(), - per_commitment_point: per_commitment_point, + per_commitment_point: trusted_tx.per_commitment_point(), htlc: htlc.clone(), preimage: *preimage, counterparty_sig: counterparty_htlc_sig, -- 2.39.5