Raise iteration capacity in chanmon consistency when settling state
What changed, and why it matters
This commit only changes an internal fuzz-testing harness (a tool used to find bugs during development, not production code). It raises the maximum number of loop iterations allowed while waiting for simulated channel state to settle, and fixes a typo in a panic message. There is no change to the actual Lightning protocol logic or any user-facing software.
No security action required. Treat as a normal test-maintenance commit.
Security signals we found
No security-relevant code change in production paths
Change is confined to a fuzz-test harness
No cryptographic, consensus, or networking modifications
No input validation, authorization, or memory-safety changes
Evidence from the diff
In fuzz/src/chanmon_consistency.rs, a constant MAX_SETTLE_ITERATIONS is introduced and set to 256, replacing a hard-coded check at iteration 100 in process_all_events(). The panic message is also corrected (‘may’ -> ‘many’). This is purely a test-infrastructure tuning change to accommodate increased complexity in LDK and the fuzz target; it does not alter consensus, cryptographic, or network behavior.
Changed components
fuzz/src/chanmon_consistency.rsInspect captured patch +3 / −2
diff --git a/fuzz/src/chanmon_consistency.rs b/fuzz/src/chanmon_consistency.rs
index da622ea..519ae51 100644
--- a/fuzz/src/chanmon_consistency.rs
+++ b/fuzz/src/chanmon_consistency.rs
@@ -102,6 +102,7 @@ use std::sync::atomic;
use std::sync::{Arc, Mutex};
const MAX_FEE: u32 = 10_000;
+const MAX_SETTLE_ITERATIONS: usize = 256;
struct FuzzEstimator {
ret_val: atomic::AtomicU32,
}
@@ -2865,9 +2866,9 @@ impl<'a, Out: Output + MaybeSend + MaybeSync> Harness<'a, Out> {
fn process_all_events(&mut self) {
let mut last_pass_no_updates = false;
for i in 0..std::usize::MAX {
- if i == 100 {
+ if i == MAX_SETTLE_ITERATIONS {
panic!(
- "It may take may iterations to settle the state, but it should not take forever"
+ "It may take many iterations to settle the state, but it should not take forever"
);
}
let mut made_progress = self.checkpoint_manager_persistences();
Why this scored 13/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.