]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Use the per-commitment point from the trusted_tx
authorChris Waterson <waterson@gmail.com>
Wed, 25 Oct 2023 18:13:23 +0000 (11:13 -0700)
committerChris Waterson <waterson@gmail.com>
Wed, 25 Oct 2023 18:13:23 +0000 (11:13 -0700)
lightning/src/chain/onchaintx.rs

index 5e892fe7b00ea6b3dd1275b9a8623f411641fea3..65178e95266c0d8570aac2c4d0b5fd212e080da8 100644 (file)
@@ -1167,15 +1167,10 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
                                .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,