From 468588f2ffca238dbce712633e84eea4531f9242 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Fri, 1 Nov 2024 10:26:46 +0100 Subject: [PATCH] Drop dead code from `provide_latest_counterparty_commitment_tx` We drop some dead code that unnecessarily allocates a `Vec` but does nothing else. --- lightning/src/chain/channelmonitor.rs | 6 ------ 1 file changed, 6 deletions(-) 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 -- 2.39.5