Skip to content

Commit 0a6b6d4

Browse files
joostjagerclaude
andcommitted
fuzz: assert no stuck payments in chanmon_consistency
After settling all state at 0xff, verify that pending_payments is empty for all nodes. If payments remain stuck indefinitely, that indicates a bug in payment resolution. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 61caa03 commit 0a6b6d4

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

fuzz/src/chanmon_consistency.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2548,6 +2548,16 @@ pub fn do_test<Out: Output>(data: &[u8], underlying_out: Out, anchors: bool) {
25482548

25492549
process_all_events!();
25502550

2551+
// Verify no payments are stuck - all should have resolved
2552+
for (idx, pending) in pending_payments.borrow().iter().enumerate() {
2553+
assert!(
2554+
pending.is_empty(),
2555+
"Node {} has {} stuck pending payments after settling all state",
2556+
idx,
2557+
pending.len()
2558+
);
2559+
}
2560+
25512561
// Finally, make sure that at least one end of each channel can make a substantial payment
25522562
for &scid in &chan_ab_scids {
25532563
assert!(

0 commit comments

Comments
 (0)