Skip to content

Commit 099bb09

Browse files
committed
Raise iteration capacity in chanmon consistency when settling state
LDK and the chanmon_consistency fuzz target have grown in complexity recently and thus require more iterations than previously assumed to fully settle the state of all active channels.
1 parent 1379144 commit 099bb09

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

fuzz/src/chanmon_consistency.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ use std::sync::atomic;
102102
use std::sync::{Arc, Mutex};
103103

104104
const MAX_FEE: u32 = 10_000;
105+
const MAX_SETTLE_ITERATIONS: usize = 256;
105106
struct FuzzEstimator {
106107
ret_val: atomic::AtomicU32,
107108
}
@@ -2865,9 +2866,9 @@ impl<'a, Out: Output + MaybeSend + MaybeSync> Harness<'a, Out> {
28652866
fn process_all_events(&mut self) {
28662867
let mut last_pass_no_updates = false;
28672868
for i in 0..std::usize::MAX {
2868-
if i == 100 {
2869+
if i == MAX_SETTLE_ITERATIONS {
28692870
panic!(
2870-
"It may take may iterations to settle the state, but it should not take forever"
2871+
"It may take many iterations to settle the state, but it should not take forever"
28712872
);
28722873
}
28732874
let mut made_progress = self.checkpoint_manager_persistences();

0 commit comments

Comments
 (0)