Handle DiscardFunding with FundingInfo::Tx variant in chanmon_consistency
What changed, and why it matters
This is a small fix to a fuzz-testing harness (a tool that automatically feeds random inputs to software to find crashes). The change teaches the test harness to recognize one more type of internal event, `DiscardFunding` carrying a full transaction, so the harness does not panic and abort the fuzzing run. It is not a fix in the production Lightning protocol code itself, and there is no indication it can be exploited by an attacker on a real network.
No security response required. Treat as a normal test-harness maintenance commit. If fuzzing infrastructure is part of CI, ensure the updated harness runs successfully.
Security signals we found
Change is confined to a fuzz target, not production node logic
No cryptographic, network, or state-machine changes
No memory-safety, authorization, or input-validation changes in shipped code
No vendor security disclosure or CVE references present
Evidence from the diff
The patch modifies fuzz/src/chanmon_consistency.rs, a channel-monitor consistency fuzz target. The process_events! macro previously only ignored Event::DiscardFunding when its funding_info was FundingInfo::Contribution. Splice RBF replacements can also emit DiscardFunding with FundingInfo::Tx, which the harness treated as an unhandled event and panicked on. The patch adds FundingInfo::Tx to the ignored match arm and improves the panic message to print the unhandled event. This is a test-infrastructure robustness fix, not a consensus or protocol security fix.
Changed components
fuzz/src/chanmon_consistency.rsLDK fuzzing infrastructureInspect captured patch +3 / −2
diff --git a/fuzz/src/chanmon_consistency.rs b/fuzz/src/chanmon_consistency.rs
index 5b5c639..b205120 100644
--- a/fuzz/src/chanmon_consistency.rs
+++ b/fuzz/src/chanmon_consistency.rs
@@ -2037,11 +2037,12 @@ pub fn do_test<Out: Output + MaybeSend + MaybeSync>(data: &[u8], out: Out) {
},
events::Event::SpliceFailed { .. } => {},
events::Event::DiscardFunding {
- funding_info: events::FundingInfo::Contribution { .. },
+ funding_info: events::FundingInfo::Contribution { .. }
+ | events::FundingInfo::Tx { .. },
..
} => {},
- _ => panic!("Unhandled event"),
+ _ => panic!("Unhandled event: {:?}", event),
}
}
while nodes[$node].needs_pending_htlc_processing() {
Why this scored 16/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.