Skip to content

Commit 987b1c9

Browse files
committed
f: Allow pending finish mempool at HTLC boundary
Let finish return when pending mempool transactions remain but the safe mining guard refuses to advance into the HTLC fail-back window. This avoids treating an end-of-input cleanup limitation as a fuzz crash.
1 parent 37183d5 commit 987b1c9

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

fuzz/src/chanmon_consistency.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,10 +2585,14 @@ impl<'a, Out: Output + MaybeSend + MaybeSync> Harness<'a, Out> {
25852585
assert_test_invariants(&self.nodes);
25862586
return;
25872587
}
2588-
assert!(
2589-
self.mine_blocks(ANTI_REORG_DELAY) > 0,
2590-
"finish cannot mine pending mempool transactions without crossing an unresolved HTLC timeout deadline"
2591-
);
2588+
if self.mine_blocks(ANTI_REORG_DELAY) == 0 {
2589+
// The input ended with pending mempool transactions but no safe
2590+
// block left before an HTLC fail-back window. Leave them
2591+
// unconfirmed rather than forcing finish cleanup to advance
2592+
// the chain past that boundary.
2593+
assert_test_invariants(&self.nodes);
2594+
return;
2595+
}
25922596
}
25932597
assert!(
25942598
!self.nodes.iter().any(|node| !node.broadcaster.txn_broadcasted.borrow().is_empty())

0 commit comments

Comments
 (0)