Remove reachable FundingTransactionReadyForSigning assertion
What changed, and why it matters
This commit removes a debug-only assertion that could crash an LDK node in normal, non-buggy situations. The assertion wrongly assumed a certain event could never be queued twice, but it actually can be if a user doesn't immediately handle the event and a channel reconnect happens. The fix makes the code silently skip re-adding the duplicate event instead of panicking. In release builds this would not crash because it was a debug_assert, but in debug/test builds or custom builds with debug assertions enabled it could cause a denial of service (node shutdown).
Treat as a low-severity robustness fix. Users running debug or custom builds with debug assertions enabled should update to avoid a possible panic during channel reestablishment. No immediate emergency action required; no evidence of remote exploitability beyond causing a debug-build crash under specific normal-use conditions.
Security signals we found
Reachable debug assertion removed
Potential debug-build denial of service via panic
Event deduplication logic made defensive
No cryptographic or memory-safety flaw evident
Evidence from the diff
In lightning/src/ln/channelmanager.rs, a debug_assert!(false, …) was triggered when a FundingTransactionReadyForSigning event was already present in pending_events during channel reestablishment. The commit removes that assertion and keeps only the deduplication guard: if the event is not already queued, push it; otherwise do nothing. This is a hardening/robustness fix rather than a vulnerability fix in the cryptographic or network sense. The reachable assertion could cause a node panic in debug builds under legitimate operational conditions (unhandled event + channel reestablish).
Changed components
lightning/src/ln/channelmanager.rsFundingTransactionReadyForSigning event handlingChannel reestablishment flowInspect captured patch +1 / −3
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index 2d7031c..6836965 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -9025,9 +9025,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
None,
);
- if pending_events.contains(&event_action) {
- debug_assert!(false, "FundingTransactionReadyForSigning should not have been queued already");
- } else {
+ if !pending_events.contains(&event_action) {
pending_events.push_back(event_action);
}
} else {
Why this scored 29/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.