Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions fuzz/src/chanmon_consistency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2726,6 +2726,23 @@ impl<'a, Out: Output + MaybeSend + MaybeSync> Harness<'a, Out> {
// PaymentSent event at the sender.
self.payments.assert_claims_reported();

// All HTLCs should have been claimed or failed once we reach quiescence.
for (idx, node) in self.nodes.iter().enumerate() {
for chan in node.list_channels() {
assert!(
chan.pending_inbound_htlcs.is_empty() && chan.pending_outbound_htlcs.is_empty(),
"Node {} channel {:?} has stuck HTLCs after settling all state: \
{} inbound {:?}, {} outbound {:?}",
idx,
chan.channel_id,
chan.pending_inbound_htlcs.len(),
chan.pending_inbound_htlcs,
chan.pending_outbound_htlcs.len(),
chan.pending_outbound_htlcs
);
}
}

// Finally, make sure that at least one end of each channel can make a substantial payment.
let chan_ab_ids = self.ab_link.channel_ids().clone();
let chan_bc_ids = self.bc_link.channel_ids().clone();
Expand Down
Loading