@@ -250,8 +250,8 @@ pub enum ResponseError {
250
250
GetNodeIdFailed ,
251
251
/// No reply path in the onion message.
252
252
NoReplyPath ,
253
- /// Could not find a route to the destination.
254
- RouteNotFound ,
253
+ /// Could not find a path to the destination.
254
+ PathNotFound ,
255
255
/// Failed to send the reply.
256
256
Sending ( SendError ) ,
257
257
}
@@ -371,20 +371,20 @@ where
371
371
} ,
372
372
} ;
373
373
374
- let intermediate_nodes = match self . message_router . find_route ( & sender, & destination) {
375
- Ok ( intermediate_nodes ) => intermediate_nodes ,
374
+ let path = match self . message_router . find_path ( & sender, destination) {
375
+ Ok ( path ) => path ,
376
376
Err ( ( ) ) => {
377
377
log_info ! (
378
- self . logger, "No route to respond to onion message with path_id {:02x?}" ,
378
+ self . logger, "No path to respond to onion message with path_id {:02x?}" ,
379
379
path_id
380
380
) ;
381
- return error_handler. handle_response_error ( ResponseError :: RouteNotFound ) ;
381
+ return error_handler. handle_response_error ( ResponseError :: PathNotFound ) ;
382
382
} ,
383
383
} ;
384
384
385
385
log_info ! ( self . logger, "Responding to onion message with path_id {:02x?}" , path_id) ;
386
386
387
- if let Err ( e) = self . send_onion_message ( & intermediate_nodes , destination , response, None ) {
387
+ if let Err ( e) = self . send_onion_message ( path , response, None ) {
388
388
log_info ! (
389
389
self . logger, "Failed responding to onion message with path_id {:02x?}: {:?}" ,
390
390
path_id, e
0 commit comments