@@ -2161,23 +2161,20 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
21612161 /// up-to-date as our holder commitment transaction is updated.
21622162 /// Panics if set_on_holder_tx_csv has never been called.
21632163 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 > {
2164- // block for Rust 1.34 compat
2165- let mut new_holder_commitment_tx = {
2166- let trusted_tx = holder_commitment_tx. trust ( ) ;
2167- let txid = trusted_tx. txid ( ) ;
2168- let tx_keys = trusted_tx. keys ( ) ;
2169- self . current_holder_commitment_number = trusted_tx. commitment_number ( ) ;
2170- HolderSignedTx {
2171- txid,
2172- revocation_key : tx_keys. revocation_key ,
2173- a_htlc_key : tx_keys. broadcaster_htlc_key ,
2174- b_htlc_key : tx_keys. countersignatory_htlc_key ,
2175- delayed_payment_key : tx_keys. broadcaster_delayed_payment_key ,
2176- per_commitment_point : tx_keys. per_commitment_point ,
2177- htlc_outputs,
2178- to_self_value_sat : holder_commitment_tx. to_broadcaster_value_sat ( ) ,
2179- feerate_per_kw : trusted_tx. feerate_per_kw ( ) ,
2180- }
2164+ let trusted_tx = holder_commitment_tx. trust ( ) ;
2165+ let txid = trusted_tx. txid ( ) ;
2166+ let tx_keys = trusted_tx. keys ( ) ;
2167+ self . current_holder_commitment_number = trusted_tx. commitment_number ( ) ;
2168+ let mut new_holder_commitment_tx = HolderSignedTx {
2169+ txid,
2170+ revocation_key : tx_keys. revocation_key ,
2171+ a_htlc_key : tx_keys. broadcaster_htlc_key ,
2172+ b_htlc_key : tx_keys. countersignatory_htlc_key ,
2173+ delayed_payment_key : tx_keys. broadcaster_delayed_payment_key ,
2174+ per_commitment_point : tx_keys. per_commitment_point ,
2175+ htlc_outputs,
2176+ to_self_value_sat : holder_commitment_tx. to_broadcaster_value_sat ( ) ,
2177+ feerate_per_kw : trusted_tx. feerate_per_kw ( ) ,
21812178 } ;
21822179 self . onchain_tx_handler . provide_latest_holder_tx ( holder_commitment_tx) ;
21832180 mem:: swap ( & mut new_holder_commitment_tx, & mut self . current_holder_commitment_tx ) ;
0 commit comments