Note that balance entries remain as long as a splice has < 6 confs
What changed, and why it matters
This commit only adds a documentation comment explaining an existing behavior in the code. It does not change any logic, fix any bug, or alter how the software operates. There is no security issue present in the change itself.
No action required. This is a documentation-only change with no security relevance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds a doc comment to the Balance::ClaimableOnChannelClose variant in lightning/src/chain/channelmonitor.rs. The comment clarifies that balance_candidates entries persist until a pending splice reaches ANTI_REORG_DELAY confirmations (6 confirmations), and that confirmed_balance_candidate_index points to the confirmed entry even before the anti-reorg delay is reached. No code behavior is modified.
Changed components
lightning/src/chain/channelmonitor.rs documentationInspect captured patch +5 / −0
diff --git a/lightning/src/chain/channelmonitor.rs b/lightning/src/chain/channelmonitor.rs
index 0f36cf1..db41ccd 100644
--- a/lightning/src/chain/channelmonitor.rs
+++ b/lightning/src/chain/channelmonitor.rs
@@ -835,6 +835,11 @@ pub enum Balance {
/// When multiple candidates exist, the last one reflects the balance of the
/// latest splice/RBF attempt, while the first reflects the balance prior to the splice
/// occurring.
+ ///
+ /// Entries remain in this vec until the pending splice has reached [`ANTI_REORG_DELAY`]
+ /// confirmations, at which point any conflicts will be removed. Once a splice confirms
+ /// [`Self::ClaimableOnChannelClose::confirmed_balance_candidate_index`] will point to the
+ /// confirmed entry, even if it has fewer than [`ANTI_REORG_DELAY`] confirmations.
balance_candidates: Vec<HolderCommitmentTransactionBalance>,
/// The index within [`Balance::ClaimableOnChannelClose::balance_candidates`] for the
/// balance according to the current onchain state of the channel. This can be helpful when
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.