Persist when ChannelMangager::splice_channel is Ok
What changed, and why it matters
This is a small bug fix in a Bitcoin Lightning Network library. After a successful 'splice' operation (a way to resize a payment channel), the software now correctly saves the updated channel state to disk. Before, it skipped saving. The risk is that if the program crashed or restarted right after a splice, it could lose track of the new channel state and potentially behave incorrectly or lose funds.
Treat as a correctness fix that should be included in the next maintenance release. Users running nodes that support splicing should upgrade to avoid state inconsistency after splice operations. No immediate emergency response is indicated because exploitation requires a local crash/restart timing window, not a remote attack vector.
Security signals we found
State persistence bug after successful channel mutation
Potential inconsistency between in-memory and on-disk channel state
Lightning channel state loss could affect fund safety or protocol correctness
Evidence from the diff
In ChannelManager::splice_channel, the return path previously used NotifyOption::SkipPersistHandleEvents on success. The patch changes the Ok branch to NotifyOption::DoPersist. The commit message explains that a successful splice sets a QuiescentAction on a FundedChannel, and because that state is persisted with the channel, an Ok result must trigger persistence. Without this, a crash shortly after splice_channel returns Ok could leave the in-memory QuiescentAction unrecorded, leading to state inconsistency on restart.
Changed components
lightning/src/ln/channelmanager.rsChannelManager::splice_channelchannel persistence / NotifyOption handlingInspect captured patch +1 / −1
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index 6a43468..1de9ad9 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -4686,7 +4686,7 @@ where
);
res = result;
match res {
- Ok(_) => NotifyOption::SkipPersistHandleEvents,
+ Ok(_) => NotifyOption::DoPersist,
Err(_) => NotifyOption::SkipPersistNoEvents,
}
});
Why this scored 43/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.