From: Elias Rohrer Date: Fri, 1 Nov 2024 09:26:46 +0000 (+0100) Subject: Drop dead code from `provide_latest_counterparty_commitment_tx` X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=468588f2ffca238dbce712633e84eea4531f9242;p=rust-lightning Drop dead code from `provide_latest_counterparty_commitment_tx` We drop some dead code that unnecessarily allocates a `Vec` but does nothing else. --- diff --git a/lightning/src/chain/channelmonitor.rs b/lightning/src/chain/channelmonitor.rs index 2d76c09f1..8257e211c 100644 --- a/lightning/src/chain/channelmonitor.rs +++ b/lightning/src/chain/channelmonitor.rs @@ -2855,12 +2855,6 @@ impl ChannelMonitorImpl { 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