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