File tree 2 files changed +10
-5
lines changed
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -1065,17 +1065,19 @@ impl OutboundPayments {
1065
1065
} ) ;
1066
1066
}
1067
1067
1068
- if ! payment_is_probe && ( !is_retryable_now || !payment_retryable || retry. is_none ( ) ) {
1068
+ if payment_is_probe || !is_retryable_now || !payment_retryable || retry. is_none ( ) {
1069
1069
let _ = payment. get_mut ( ) . mark_abandoned ( ) ; // we'll only Err if it's a legacy payment
1070
1070
is_retryable_now = false ;
1071
1071
}
1072
1072
if payment. get ( ) . remaining_parts ( ) == 0 {
1073
1073
all_paths_failed = true ;
1074
1074
if payment. get ( ) . abandoned ( ) {
1075
- full_failure_ev = Some ( events:: Event :: PaymentFailed {
1076
- payment_id : * payment_id,
1077
- payment_hash : payment. get ( ) . payment_hash ( ) . expect ( "PendingOutboundPayments::RetriesExceeded always has a payment hash set" ) ,
1078
- } ) ;
1075
+ if !payment_is_probe {
1076
+ full_failure_ev = Some ( events:: Event :: PaymentFailed {
1077
+ payment_id : * payment_id,
1078
+ payment_hash : payment. get ( ) . payment_hash ( ) . expect ( "PendingOutboundPayments::RetriesExceeded always has a payment hash set" ) ,
1079
+ } ) ;
1080
+ }
1079
1081
payment. remove ( ) ;
1080
1082
}
1081
1083
}
Original file line number Diff line number Diff line change @@ -942,6 +942,7 @@ fn successful_probe_yields_event() {
942
942
} ,
943
943
_ => panic ! ( ) ,
944
944
} ;
945
+ assert ! ( !nodes[ 0 ] . node. has_pending_payments( ) ) ;
945
946
}
946
947
947
948
#[ test]
@@ -987,6 +988,7 @@ fn failed_probe_yields_event() {
987
988
} ,
988
989
_ => panic ! ( ) ,
989
990
} ;
991
+ assert ! ( !nodes[ 0 ] . node. has_pending_payments( ) ) ;
990
992
}
991
993
992
994
#[ test]
@@ -1041,6 +1043,7 @@ fn onchain_failed_probe_yields_event() {
1041
1043
}
1042
1044
}
1043
1045
assert ! ( found_probe_failed) ;
1046
+ assert ! ( !nodes[ 0 ] . node. has_pending_payments( ) ) ;
1044
1047
}
1045
1048
1046
1049
#[ test]
You can’t perform that action at this time.
0 commit comments