]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Move `htlc_basepoint` to variable
authorElias Rohrer <dev@tnull.de>
Wed, 27 Mar 2024 10:55:19 +0000 (11:55 +0100)
committerElias Rohrer <dev@tnull.de>
Tue, 9 Apr 2024 11:08:25 +0000 (13:08 +0200)
lightning/src/sign/mod.rs

index e7cee4701236f38bb6c114f55544975635109bd2..b1d876b3e31b5cf47c802a3d019f8d1bce985a1c 100644 (file)
@@ -1229,7 +1229,8 @@ impl EcdsaChannelSigner for InMemorySigner {
                let counterparty_htlcpubkey = HtlcKey::from_basepoint(
                        &secp_ctx, &counterparty_keys.htlc_basepoint, &per_commitment_point,
                );
-               let htlcpubkey = HtlcKey::from_basepoint(&secp_ctx, &self.pubkeys().htlc_basepoint, &per_commitment_point);
+               let htlc_basepoint = self.pubkeys().htlc_basepoint;
+               let htlcpubkey = HtlcKey::from_basepoint(&secp_ctx, &htlc_basepoint, &per_commitment_point);
                let chan_type = self.channel_type_features().expect(MISSING_PARAMS_ERR);
                let witness_script = chan_utils::get_htlc_redeemscript_with_explicit_keys(&htlc, chan_type, &counterparty_htlcpubkey, &htlcpubkey, &revocation_pubkey);
                let mut sighash_parts = sighash::SighashCache::new(htlc_tx);