Skip to content

Commit 7912091

Browse files
committed
Remove unused compat block in provide_latest_holder_commitment_tx
1 parent 494301f commit 7912091

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2154,23 +2154,20 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
21542154
/// up-to-date as our holder commitment transaction is updated.
21552155
/// Panics if set_on_holder_tx_csv has never been called.
21562156
fn provide_latest_holder_commitment_tx(&mut self, holder_commitment_tx: HolderCommitmentTransaction, htlc_outputs: Vec<(HTLCOutputInCommitment, Option<Signature>, Option<HTLCSource>)>, claimed_htlcs: &[(SentHTLCId, PaymentPreimage)]) -> Result<(), &'static str> {
2157-
// block for Rust 1.34 compat
2158-
let mut new_holder_commitment_tx = {
2159-
let trusted_tx = holder_commitment_tx.trust();
2160-
let txid = trusted_tx.txid();
2161-
let tx_keys = trusted_tx.keys();
2162-
self.current_holder_commitment_number = trusted_tx.commitment_number();
2163-
HolderSignedTx {
2164-
txid,
2165-
revocation_key: tx_keys.revocation_key,
2166-
a_htlc_key: tx_keys.broadcaster_htlc_key,
2167-
b_htlc_key: tx_keys.countersignatory_htlc_key,
2168-
delayed_payment_key: tx_keys.broadcaster_delayed_payment_key,
2169-
per_commitment_point: tx_keys.per_commitment_point,
2170-
htlc_outputs,
2171-
to_self_value_sat: holder_commitment_tx.to_broadcaster_value_sat(),
2172-
feerate_per_kw: trusted_tx.feerate_per_kw(),
2173-
}
2157+
let trusted_tx = holder_commitment_tx.trust();
2158+
let txid = trusted_tx.txid();
2159+
let tx_keys = trusted_tx.keys();
2160+
self.current_holder_commitment_number = trusted_tx.commitment_number();
2161+
let mut new_holder_commitment_tx = HolderSignedTx {
2162+
txid,
2163+
revocation_key: tx_keys.revocation_key,
2164+
a_htlc_key: tx_keys.broadcaster_htlc_key,
2165+
b_htlc_key: tx_keys.countersignatory_htlc_key,
2166+
delayed_payment_key: tx_keys.broadcaster_delayed_payment_key,
2167+
per_commitment_point: tx_keys.per_commitment_point,
2168+
htlc_outputs,
2169+
to_self_value_sat: holder_commitment_tx.to_broadcaster_value_sat(),
2170+
feerate_per_kw: trusted_tx.feerate_per_kw(),
21742171
};
21752172
self.onchain_tx_handler.provide_latest_holder_tx(holder_commitment_tx);
21762173
mem::swap(&mut new_holder_commitment_tx, &mut self.current_holder_commitment_tx);

0 commit comments

Comments
 (0)