@@ -89,12 +89,12 @@ use crate::prelude::*;
89
89
/// let message = OnionMessageContents::Custom(your_custom_message);
90
90
/// onion_messenger.send_onion_message(&intermediate_hops, Destination::Node(destination_node_id), message, reply_path);
91
91
///
92
- /// // Create a blinded route to yourself, for someone to send an onion message to.
92
+ /// // Create a blinded path to yourself, for someone to send an onion message to.
93
93
/// # let your_node_id = hop_node_id1;
94
94
/// let hops = [hop_node_id3, hop_node_id4, your_node_id];
95
95
/// let blinded_path = BlindedPath::new(&hops, &keys_manager, &secp_ctx).unwrap();
96
96
///
97
- /// // Send a custom onion message to a blinded route .
97
+ /// // Send a custom onion message to a blinded path .
98
98
/// # let intermediate_hops = [hop_node_id1, hop_node_id2];
99
99
/// let reply_path = None;
100
100
/// # let your_custom_message = YourCustomMessage {};
@@ -122,7 +122,7 @@ pub struct OnionMessenger<K: Deref, L: Deref, CMH: Deref>
122
122
pub enum Destination {
123
123
/// We're sending this onion message to a node.
124
124
Node ( PublicKey ) ,
125
- /// We're sending this onion message to a blinded route .
125
+ /// We're sending this onion message to a blinded path .
126
126
BlindedPath ( BlindedPath ) ,
127
127
}
128
128
@@ -158,8 +158,8 @@ pub enum SendError {
158
158
///
159
159
/// [`KeysInterface`]: crate::chain::keysinterface::KeysInterface
160
160
GetNodeIdFailed ,
161
- /// We attempted to send to a blinded route where we are the introduction node, and failed to
162
- /// advance the blinded route to make the second hop the new introduction node. Either
161
+ /// We attempted to send to a blinded path where we are the introduction node, and failed to
162
+ /// advance the blinded path to make the second hop the new introduction node. Either
163
163
/// [`KeysInterface::ecdh`] failed, we failed to tweak the current blinding point to get the
164
164
/// new blinding point, or we were attempting to send to ourselves.
165
165
BlindedPathAdvanceFailed ,
@@ -216,8 +216,8 @@ impl<K: Deref, L: Deref, CMH: Deref> OnionMessenger<K, L, CMH>
216
216
let OnionMessageContents :: Custom ( ref msg) = message;
217
217
if msg. tlv_type ( ) < 64 { return Err ( SendError :: InvalidMessage ) }
218
218
219
- // If we are sending straight to a blinded route and we are the introduction node, we need to
220
- // advance the blinded route by 1 hop so the second hop is the new introduction node.
219
+ // If we are sending straight to a blinded path and we are the introduction node, we need to
220
+ // advance the blinded path by 1 hop so the second hop is the new introduction node.
221
221
if intermediate_nodes. len ( ) == 0 {
222
222
if let Destination :: BlindedPath ( ref mut blinded_path) = destination {
223
223
let our_node_id = self . keys_manager . get_node_id ( Recipient :: Node )
@@ -346,7 +346,7 @@ impl<K: Deref, L: Deref, CMH: Deref> OnionMessageHandler for OnionMessenger<K, L
346
346
// TODO: we need to check whether `next_node_id` is our node, in which case this is a dummy
347
347
// blinded hop and this onion message is destined for us. In this situation, we should keep
348
348
// unwrapping the onion layers to get to the final payload. Since we don't have the option
349
- // of creating blinded routes with dummy hops currently, we should be ok to not handle this
349
+ // of creating blinded paths with dummy hops currently, we should be ok to not handle this
350
350
// for now.
351
351
let new_pubkey = match onion_utils:: next_hop_packet_pubkey ( & self . secp_ctx , msg. onion_routing_packet . public_key , & onion_decode_ss) {
352
352
Ok ( pk) => pk,
0 commit comments