Skip to content

Commit e9d4ae1

Browse files
committed
Add error messages to stale gossip cleanup assertions.
Should help debug #1914.
1 parent ac6e0b3 commit e9d4ae1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/routing/gossip.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2542,13 +2542,13 @@ mod tests {
25422542
// Should not remove from tracking if insufficient time has passed
25432543
network_graph.remove_stale_channels_and_tracking_with_time(
25442544
tracking_time + REMOVED_ENTRIES_TRACKING_AGE_LIMIT_SECS - 1);
2545-
assert_eq!(network_graph.removed_channels.lock().unwrap().len(), 1);
2545+
assert_eq!(network_graph.removed_channels.lock().unwrap().len(), 1, "Removed channel count ≠ 1 with tracking_time {}", tracking_time);
25462546

25472547
// Provide a later time so that sufficient time has passed
25482548
network_graph.remove_stale_channels_and_tracking_with_time(
25492549
tracking_time + REMOVED_ENTRIES_TRACKING_AGE_LIMIT_SECS);
2550-
assert!(network_graph.removed_channels.lock().unwrap().is_empty());
2551-
assert!(network_graph.removed_nodes.lock().unwrap().is_empty());
2550+
assert!(network_graph.removed_channels.lock().unwrap().is_empty(), "Unexpectedly removed channels with tracking_time {}", tracking_time);
2551+
assert!(network_graph.removed_nodes.lock().unwrap().is_empty(), "Unexpectedly removed nodes with tracking_time {}", tracking_time);
25522552
}
25532553

25542554
#[cfg(not(feature = "std"))]

0 commit comments

Comments
 (0)