From: Chris Waterson Date: Wed, 25 Oct 2023 18:13:23 +0000 (-0700) Subject: Use the per-commitment point from the trusted_tx X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=0967961ab898c7975f2aff7838bbb6015309b4b4;p=rust-lightning Use the per-commitment point from the trusted_tx --- 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,