File tree 1 file changed +17
-16
lines changed
1 file changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -1068,22 +1068,23 @@ macro_rules! unwrap_send_err {
1068
1068
assert!( $res. is_ok( ) ) ;
1069
1069
let events = $node. node. get_and_clear_pending_events( ) ;
1070
1070
assert!( events. len( ) == 2 ) ;
1071
- for ev in events {
1072
- match ev {
1073
- crate :: events:: Event :: PaymentPathFailed { failure, .. } => {
1074
- match failure {
1075
- crate :: events:: PathFailure :: InitialSend { err } => {
1076
- match err {
1077
- $type => { $check } ,
1078
- _ => panic!( )
1079
- }
1080
- } ,
1081
- _ => panic!( )
1082
- }
1083
- } ,
1084
- crate :: events:: Event :: PaymentFailed { .. } => { } ,
1085
- _ => panic!( )
1086
- }
1071
+ match & events[ 0 ] {
1072
+ crate :: events:: Event :: PaymentPathFailed { failure, .. } => {
1073
+ match failure {
1074
+ crate :: events:: PathFailure :: InitialSend { err } => {
1075
+ match err {
1076
+ $type => { $check } ,
1077
+ _ => panic!( )
1078
+ }
1079
+ } ,
1080
+ _ => panic!( )
1081
+ }
1082
+ } ,
1083
+ _ => panic!( )
1084
+ }
1085
+ match & events[ 1 ] {
1086
+ crate :: events:: Event :: PaymentFailed { .. } => { } ,
1087
+ _ => panic!( )
1087
1088
}
1088
1089
}
1089
1090
}
You can’t perform that action at this time.
0 commit comments