Skip to content

Commit 68bde15

Browse files
committed
f - changes for MessageRouter interface
1 parent 6b3c8c1 commit 68bde15

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lightning/src/onion_message/messenger.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ pub enum ResponseError {
250250
GetNodeIdFailed,
251251
/// No reply path in the onion message.
252252
NoReplyPath,
253-
/// Could not find a route to the destination.
254-
RouteNotFound,
253+
/// Could not find a path to the destination.
254+
PathNotFound,
255255
/// Failed to send the reply.
256256
Sending(SendError),
257257
}
@@ -371,20 +371,20 @@ where
371371
},
372372
};
373373

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,
376376
Err(()) => {
377377
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?}",
379379
path_id
380380
);
381-
return error_handler.handle_response_error(ResponseError::RouteNotFound);
381+
return error_handler.handle_response_error(ResponseError::PathNotFound);
382382
},
383383
};
384384

385385
log_info!(self.logger, "Responding to onion message with path_id {:02x?}", path_id);
386386

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) {
388388
log_info!(
389389
self.logger, "Failed responding to onion message with path_id {:02x?}: {:?}",
390390
path_id, e

0 commit comments

Comments
 (0)