]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Drop unused variable and loop in channel_monitor_updated
authorMatt Corallo <git@bluematt.me>
Fri, 20 Nov 2020 19:06:17 +0000 (14:06 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 1 Mar 2021 02:03:18 +0000 (21:03 -0500)
lightning/src/ln/channelmanager.rs

index 4b10340f4c37ba05683679169e9d674262485774..fc48b2fbb38020b5a8aa715630f62df3ff958987 100644 (file)
@@ -2262,7 +2262,6 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
        pub fn channel_monitor_updated(&self, funding_txo: &OutPoint, highest_applied_update_id: u64) {
                let _persistence_guard = PersistenceNotifierGuard::new(&self.total_consistency_lock, &self.persistence_notifier);
 
-               let mut close_results = Vec::new();
                let mut htlc_forwards = Vec::new();
                let mut htlc_failures = Vec::new();
                let mut pending_events = Vec::new();
@@ -2339,10 +2338,6 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
                        self.fail_htlc_backwards_internal(self.channel_state.lock().unwrap(), failure.0, &failure.1, failure.2);
                }
                self.forward_htlcs(&mut htlc_forwards[..]);
-
-               for res in close_results.drain(..) {
-                       self.finish_force_close_channel(res);
-               }
        }
 
        fn internal_open_channel(&self, counterparty_node_id: &PublicKey, their_features: InitFeatures, msg: &msgs::OpenChannel) -> Result<(), MsgHandleErrInternal> {