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