You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lightning/src/ln/channel.rs
+9-5
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ use ln::msgs;
19
19
use ln::msgs::{DecodeError,OptionalField,DataLossProtect};
20
20
use ln::channelmonitor::{ChannelMonitor,ChannelMonitorUpdate,ChannelMonitorUpdateStep,HTLC_FAIL_BACK_BUFFER};
21
21
use ln::channelmanager::{PendingHTLCStatus,HTLCSource,HTLCFailReason,HTLCFailureMsg,PendingHTLCInfo,RAACommitmentOrder,PaymentPreimage,PaymentHash,BREAKDOWN_TIMEOUT,MAX_LOCAL_BREAKDOWN_TIMEOUT};
22
-
use ln::chan_utils::{CounterpartyCommitmentSecrets,LocalCommitmentTransaction,TxCreationKeys,HTLCOutputInCommitment,HTLC_SUCCESS_TX_WEIGHT,HTLC_TIMEOUT_TX_WEIGHT, make_funding_redeemscript,ChannelPublicKeys};
22
+
use ln::chan_utils::{CounterpartyCommitmentSecrets,LocalCommitmentTransaction,TxCreationKeys,HTLCOutputInCommitment,HTLC_SUCCESS_TX_WEIGHT,HTLC_TIMEOUT_TX_WEIGHT, make_funding_redeemscript,ChannelPublicKeys,PreCalculatedTxCreationKeys};
23
23
use ln::chan_utils;
24
24
use chain::chaininterface::{FeeEstimator,ConfirmationTarget};
let remote_keys = self.build_remote_transaction_keys()?;
1486
1486
let remote_initial_commitment_tx = self.build_commitment_transaction(self.cur_remote_commitment_transaction_number,&remote_keys,false,false,self.feerate_per_kw, logger).0;
1487
-
let remote_signature = self.local_keys.sign_remote_commitment(self.feerate_per_kw,&remote_initial_commitment_tx,&remote_keys,&Vec::new(),&self.secp_ctx)
1487
+
let pre_remote_keys = PreCalculatedTxCreationKeys::new(remote_keys);
1488
+
let remote_signature = self.local_keys.sign_remote_commitment(self.feerate_per_kw,&remote_initial_commitment_tx,&pre_remote_keys,&Vec::new(),&self.secp_ctx)
1488
1489
.map_err(|_| ChannelError::Close("Failed to get signatures for new commitment_signed".to_owned()))?.0;
1489
1490
1490
1491
// We sign the "remote" commitment transaction, allowing them to broadcast the tx if they wish.
let remote_keys = self.build_remote_transaction_keys()?;
3534
3535
let remote_initial_commitment_tx = self.build_commitment_transaction(self.cur_remote_commitment_transaction_number,&remote_keys,false,false,self.feerate_per_kw, logger).0;
0 commit comments