+macro_rules! expect_payment_forwarded {
+ ($node: expr, $expected_fee: expr, $upstream_force_closed: expr) => {
+ let events = $node.node.get_and_clear_pending_events();
+ assert_eq!(events.len(), 1);
+ match events[0] {
+ Event::PaymentForwarded { fee_earned_msat, claim_from_onchain_tx } => {
+ assert_eq!(fee_earned_msat, $expected_fee);
+ assert_eq!(claim_from_onchain_tx, $upstream_force_closed);
+ },
+ _ => panic!("Unexpected event"),
+ }
+ }
+}
+