Add comment describing when a completion action can be discarded
[rust-lightning] / lightning / src / ln / channelmanager.rs
index b4eed11fc39e9916fa8564bdf4f5799a81fcec2a..7ec75e20fa36a6f9fdbb00f57a68fa6160d1dc88 100644 (file)
@@ -8943,6 +8943,12 @@ where
                                                                blocked_peer_state.lock().unwrap().actions_blocking_raa_monitor_updates
                                                                        .entry(blocked_channel_outpoint.to_channel_id())
                                                                        .or_insert_with(Vec::new).push(blocking_action.clone());
+                                                       } else {
+                                                               // If the channel we were blocking has closed, we don't need to
+                                                               // worry about it - the blocked monitor update should never have
+                                                               // been released from the `Channel` object so it can't have
+                                                               // completed, and if the channel closed there's no reason to bother
+                                                               // anymore.
                                                        }
                                                }
                                        }