Clarify that each pending monitor update ID must be marked complete
What changed, and why it matters
This commit only rewords a documentation comment in the source code. It does not change any code logic, fix a bug, or alter behavior. The change clarifies that each pending monitor update ID must still be individually marked complete even after a full ChannelMonitor has been persisted. There is no security vulnerability being patched here.
No security action required. Treat as a normal documentation improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies a single Rust documentation comment in lightning/src/chain/chainmonitor.rs. The previous wording suggested that persisting a full ChannelMonitor automatically resolved all pending updates. The new wording explicitly states that each update ID must be individually marked complete via channel_monitor_updated, even though a full persistence covers all prior updates. No executable code, API signatures, or runtime behavior changed.
Changed components
lightning/src/chain/chainmonitor.rs documentationInspect captured patch +4 / −2
diff --git a/lightning/src/chain/chainmonitor.rs b/lightning/src/chain/chainmonitor.rs
index 7db1b69..74e5e03 100644
--- a/lightning/src/chain/chainmonitor.rs
+++ b/lightning/src/chain/chainmonitor.rs
@@ -83,8 +83,10 @@ use core::sync::atomic::{AtomicUsize, Ordering};
/// the background with [`ChainMonitor::list_pending_monitor_updates`] and
/// [`ChainMonitor::get_monitor`].
///
-/// Once a full [`ChannelMonitor`] has been persisted, all pending updates for that channel can
-/// be marked as complete via [`ChainMonitor::channel_monitor_updated`].
+/// Each pending update must be individually marked as complete by calling
+/// [`ChainMonitor::channel_monitor_updated`] with the corresponding update ID. Note that
+/// persisting a full [`ChannelMonitor`] covers all prior updates, but each update ID still
+/// needs to be marked complete separately.
///
/// If at some point no further progress can be made towards persisting the pending updates, the
/// node should simply shut down.
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.