Skip to content

Commit 8058202

Browse files
committed
nit
1 parent 6f635c6 commit 8058202

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lightning/src/ln/channel.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -3880,11 +3880,12 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
38803880
htlcs.push(htlc);
38813881
}
38823882

3883-
let pre_remote_keys = PreCalculatedTxCreationKeys::new(remote_keys.clone());
3883+
let pre_remote_keys = PreCalculatedTxCreationKeys::new(remote_keys);
38843884
let res = self.local_keys.sign_remote_commitment(feerate_per_kw, &remote_commitment_tx.0, &pre_remote_keys, &htlcs, &self.secp_ctx)
38853885
.map_err(|_| ChannelError::Close("Failed to get signatures for new commitment_signed".to_owned()))?;
38863886
signature = res.0;
38873887
htlc_signatures = res.1;
3888+
let remote_keys = pre_remote_keys.trust_key_derivation();
38883889

38893890
log_trace!(logger, "Signed remote commitment tx {} with redeemscript {} -> {}",
38903891
encode::serialize_hex(&remote_commitment_tx.0),
@@ -3894,7 +3895,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
38943895
for (ref htlc_sig, ref htlc) in htlc_signatures.iter().zip(htlcs) {
38953896
log_trace!(logger, "Signed remote HTLC tx {} with redeemscript {} with pubkey {} -> {}",
38963897
encode::serialize_hex(&chan_utils::build_htlc_transaction(&remote_commitment_tx.0.txid(), feerate_per_kw, self.our_to_self_delay, htlc, &remote_keys.a_delayed_payment_key, &remote_keys.revocation_key)),
3897-
encode::serialize_hex(&chan_utils::get_htlc_redeemscript(&htlc, &remote_keys)),
3898+
encode::serialize_hex(&chan_utils::get_htlc_redeemscript(&htlc, remote_keys)),
38983899
log_bytes!(remote_keys.a_htlc_key.serialize()),
38993900
log_bytes!(htlc_sig.serialize_compact()[..]));
39003901
}

0 commit comments

Comments
 (0)