From aa34d35e82932015ad28fef00b3450734c0bc16e Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 21 Sep 2021 06:10:23 +0000 Subject: [PATCH] f check every failure --- lightning/src/ln/functional_test_utils.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lightning/src/ln/functional_test_utils.rs b/lightning/src/ln/functional_test_utils.rs index a8b91735c..5690c834e 100644 --- a/lightning/src/ln/functional_test_utils.rs +++ b/lightning/src/ln/functional_test_utils.rs @@ -769,11 +769,14 @@ macro_rules! check_closed_event { ($node: expr, $events: expr, $reason: expr) => {{ let events = $node.node.get_and_clear_pending_events(); assert_eq!(events.len(), $events); - match events[0] { - Event::ChannelClosed { ref reason, .. } => { - assert_eq!(*reason, $reason); - }, - _ => panic!("Unexpected event"), + let expected_reason = $reason; + for event in events { + match event { + Event::ChannelClosed { ref reason, .. } => { + assert_eq!(*reason, expected_reason); + }, + _ => panic!("Unexpected event"), + } } }} } -- 2.39.5