File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -709,7 +709,7 @@ impl OutboundPayments {
709
709
let mut events = pending_events. lock ( ) . unwrap ( ) ;
710
710
debug_assert_eq ! ( paths. len( ) , path_results. len( ) ) ;
711
711
for ( path, path_res) in paths. into_iter ( ) . zip ( path_results) {
712
- if path_res . is_err ( ) {
712
+ if let Err ( e ) = path_res {
713
713
let scid = path[ 0 ] . short_channel_id ;
714
714
events. push ( events:: Event :: PaymentPathFailed {
715
715
payment_id : Some ( payment_id) ,
@@ -718,7 +718,7 @@ impl OutboundPayments {
718
718
network_update : None ,
719
719
all_paths_failed : false ,
720
720
path,
721
- short_channel_id : Some ( scid) ,
721
+ short_channel_id : if let APIError :: InvalidRoute { .. } = e { None } else { Some ( scid) } ,
722
722
retry : None ,
723
723
#[ cfg( test) ]
724
724
error_code : None ,
You can’t perform that action at this time.
0 commit comments