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