From: Matt Corallo Date: Tue, 21 Sep 2021 06:10:23 +0000 (+0000) Subject: f check every failure X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=aa34d35e82932015ad28fef00b3450734c0bc16e;p=rust-lightning f check every failure --- 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"), + } } }} }