]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Drop dead code from `provide_latest_counterparty_commitment_tx`
authorElias Rohrer <dev@tnull.de>
Fri, 1 Nov 2024 09:26:46 +0000 (10:26 +0100)
committerElias Rohrer <dev@tnull.de>
Fri, 1 Nov 2024 09:26:46 +0000 (10:26 +0100)
We drop some dead code that unnecessarily allocates a `Vec` but does
nothing else.

lightning/src/chain/channelmonitor.rs

index 2d76c09f1bb17782a16f3e420ab76e4866798a0c..8257e211c0ddaa1b9a41bc6493fcb2796063db4c 100644 (file)
@@ -2855,12 +2855,6 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
                                self.their_cur_per_commitment_points = Some((commitment_number, their_per_commitment_point, None));
                        }
                }
-               let mut htlcs = Vec::with_capacity(htlc_outputs.len());
-               for htlc in htlc_outputs {
-                       if htlc.0.transaction_output_index.is_some() {
-                               htlcs.push(htlc.0);
-                       }
-               }
        }
 
        /// Informs this monitor of the latest holder (ie broadcastable) commitment transaction. The