Skip to content

Commit 9b6de78

Browse files
committed
Unify blinding nomenclature to call them "paths" not "routes".
Currently the `onion_message` module exposes the blinded route object as *both* `BlindedRoute` and `BlindedPath`. This is somewhat confusing, and given they are really paths, not routes (at least in the sense that a route could be multi-path, though for OMs they are not), here we unify to only call them paths.
1 parent d4dc05b commit 9b6de78

File tree

6 files changed

+46
-46
lines changed

6 files changed

+46
-46
lines changed

lightning/src/onion_message/blinded_route.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use crate::prelude::*;
2929
/// Onion messages can be sent and received to blinded routes, which serve to hide the identity of
3030
/// the recipient.
3131
#[derive(Clone, Debug, PartialEq)]
32-
pub struct BlindedRoute {
32+
pub struct BlindedPath {
3333
/// To send to a blinded route, the sender first finds a route to the unblinded
3434
/// `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion
3535
/// message's next hop and forward it along.
@@ -57,7 +57,7 @@ pub struct BlindedHop {
5757
pub(crate) encrypted_payload: Vec<u8>,
5858
}
5959

60-
impl BlindedRoute {
60+
impl BlindedPath {
6161
/// Create a blinded route to be forwarded along `node_pks`. The last node pubkey in `node_pks`
6262
/// will be the destination node.
6363
///
@@ -71,7 +71,7 @@ impl BlindedRoute {
7171
let blinding_secret = SecretKey::from_slice(&blinding_secret_bytes[..]).expect("RNG is busted");
7272
let introduction_node_id = node_pks[0];
7373

74-
Ok(BlindedRoute {
74+
Ok(BlindedPath {
7575
introduction_node_id,
7676
blinding_point: PublicKey::from_secret_key(secp_ctx, &blinding_secret),
7777
blinded_hops: blinded_hops(secp_ctx, node_pks, &blinding_secret).map_err(|_| ())?,
@@ -156,7 +156,7 @@ fn encrypt_payload<P: Writeable>(payload: P, encrypted_tlvs_ss: [u8; 32]) -> Vec
156156
writer.0
157157
}
158158

159-
impl Writeable for BlindedRoute {
159+
impl Writeable for BlindedPath {
160160
fn write<W: Writer>(&self, w: &mut W) -> Result<(), io::Error> {
161161
self.introduction_node_id.write(w)?;
162162
self.blinding_point.write(w)?;
@@ -168,7 +168,7 @@ impl Writeable for BlindedRoute {
168168
}
169169
}
170170

171-
impl Readable for BlindedRoute {
171+
impl Readable for BlindedPath {
172172
fn read<R: io::Read>(r: &mut R) -> Result<Self, DecodeError> {
173173
let introduction_node_id = Readable::read(r)?;
174174
let blinding_point = Readable::read(r)?;
@@ -178,7 +178,7 @@ impl Readable for BlindedRoute {
178178
for _ in 0..num_hops {
179179
blinded_hops.push(Readable::read(r)?);
180180
}
181-
Ok(BlindedRoute {
181+
Ok(BlindedPath {
182182
introduction_node_id,
183183
blinding_point,
184184
blinded_hops,

lightning/src/onion_message/functional_tests.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use crate::chain::keysinterface::{KeysInterface, Recipient};
1313
use crate::ln::features::InitFeatures;
1414
use crate::ln::msgs::{self, DecodeError, OnionMessageHandler};
15-
use super::{BlindedRoute, CustomOnionMessageContents, CustomOnionMessageHandler, Destination, OnionMessageContents, OnionMessenger, SendError};
15+
use super::{BlindedPath, CustomOnionMessageContents, CustomOnionMessageHandler, Destination, OnionMessageContents, OnionMessenger, SendError};
1616
use crate::util::ser::{Writeable, Writer};
1717
use crate::util::test_utils;
1818

@@ -136,9 +136,9 @@ fn two_unblinded_two_blinded() {
136136
let test_msg = OnionMessageContents::Custom(TestCustomMessage {});
137137

138138
let secp_ctx = Secp256k1::new();
139-
let blinded_route = BlindedRoute::new(&[nodes[3].get_node_pk(), nodes[4].get_node_pk()], &*nodes[4].keys_manager, &secp_ctx).unwrap();
139+
let blinded_route = BlindedPath::new(&[nodes[3].get_node_pk(), nodes[4].get_node_pk()], &*nodes[4].keys_manager, &secp_ctx).unwrap();
140140

141-
nodes[0].messenger.send_onion_message(&[nodes[1].get_node_pk(), nodes[2].get_node_pk()], Destination::BlindedRoute(blinded_route), test_msg, None).unwrap();
141+
nodes[0].messenger.send_onion_message(&[nodes[1].get_node_pk(), nodes[2].get_node_pk()], Destination::BlindedPath(blinded_route), test_msg, None).unwrap();
142142
pass_along_path(&nodes, None);
143143
}
144144

@@ -148,9 +148,9 @@ fn three_blinded_hops() {
148148
let test_msg = OnionMessageContents::Custom(TestCustomMessage {});
149149

150150
let secp_ctx = Secp256k1::new();
151-
let blinded_route = BlindedRoute::new(&[nodes[1].get_node_pk(), nodes[2].get_node_pk(), nodes[3].get_node_pk()], &*nodes[3].keys_manager, &secp_ctx).unwrap();
151+
let blinded_route = BlindedPath::new(&[nodes[1].get_node_pk(), nodes[2].get_node_pk(), nodes[3].get_node_pk()], &*nodes[3].keys_manager, &secp_ctx).unwrap();
152152

153-
nodes[0].messenger.send_onion_message(&[], Destination::BlindedRoute(blinded_route), test_msg, None).unwrap();
153+
nodes[0].messenger.send_onion_message(&[], Destination::BlindedPath(blinded_route), test_msg, None).unwrap();
154154
pass_along_path(&nodes, None);
155155
}
156156

@@ -174,14 +174,14 @@ fn we_are_intro_node() {
174174
let test_msg = TestCustomMessage {};
175175

176176
let secp_ctx = Secp256k1::new();
177-
let blinded_route = BlindedRoute::new(&[nodes[0].get_node_pk(), nodes[1].get_node_pk(), nodes[2].get_node_pk()], &*nodes[2].keys_manager, &secp_ctx).unwrap();
177+
let blinded_route = BlindedPath::new(&[nodes[0].get_node_pk(), nodes[1].get_node_pk(), nodes[2].get_node_pk()], &*nodes[2].keys_manager, &secp_ctx).unwrap();
178178

179-
nodes[0].messenger.send_onion_message(&[], Destination::BlindedRoute(blinded_route), OnionMessageContents::Custom(test_msg.clone()), None).unwrap();
179+
nodes[0].messenger.send_onion_message(&[], Destination::BlindedPath(blinded_route), OnionMessageContents::Custom(test_msg.clone()), None).unwrap();
180180
pass_along_path(&nodes, None);
181181

182182
// Try with a two-hop blinded route where we are the introduction node.
183-
let blinded_route = BlindedRoute::new(&[nodes[0].get_node_pk(), nodes[1].get_node_pk()], &*nodes[1].keys_manager, &secp_ctx).unwrap();
184-
nodes[0].messenger.send_onion_message(&[], Destination::BlindedRoute(blinded_route), OnionMessageContents::Custom(test_msg), None).unwrap();
183+
let blinded_route = BlindedPath::new(&[nodes[0].get_node_pk(), nodes[1].get_node_pk()], &*nodes[1].keys_manager, &secp_ctx).unwrap();
184+
nodes[0].messenger.send_onion_message(&[], Destination::BlindedPath(blinded_route), OnionMessageContents::Custom(test_msg), None).unwrap();
185185
nodes.remove(2);
186186
pass_along_path(&nodes, None);
187187
}
@@ -194,16 +194,16 @@ fn invalid_blinded_route_error() {
194194

195195
// 0 hops
196196
let secp_ctx = Secp256k1::new();
197-
let mut blinded_route = BlindedRoute::new(&[nodes[1].get_node_pk(), nodes[2].get_node_pk()], &*nodes[2].keys_manager, &secp_ctx).unwrap();
197+
let mut blinded_route = BlindedPath::new(&[nodes[1].get_node_pk(), nodes[2].get_node_pk()], &*nodes[2].keys_manager, &secp_ctx).unwrap();
198198
blinded_route.blinded_hops.clear();
199-
let err = nodes[0].messenger.send_onion_message(&[], Destination::BlindedRoute(blinded_route), OnionMessageContents::Custom(test_msg.clone()), None).unwrap_err();
199+
let err = nodes[0].messenger.send_onion_message(&[], Destination::BlindedPath(blinded_route), OnionMessageContents::Custom(test_msg.clone()), None).unwrap_err();
200200
assert_eq!(err, SendError::TooFewBlindedHops);
201201

202202
// 1 hop
203-
let mut blinded_route = BlindedRoute::new(&[nodes[1].get_node_pk(), nodes[2].get_node_pk()], &*nodes[2].keys_manager, &secp_ctx).unwrap();
203+
let mut blinded_route = BlindedPath::new(&[nodes[1].get_node_pk(), nodes[2].get_node_pk()], &*nodes[2].keys_manager, &secp_ctx).unwrap();
204204
blinded_route.blinded_hops.remove(0);
205205
assert_eq!(blinded_route.blinded_hops.len(), 1);
206-
let err = nodes[0].messenger.send_onion_message(&[], Destination::BlindedRoute(blinded_route), OnionMessageContents::Custom(test_msg), None).unwrap_err();
206+
let err = nodes[0].messenger.send_onion_message(&[], Destination::BlindedPath(blinded_route), OnionMessageContents::Custom(test_msg), None).unwrap_err();
207207
assert_eq!(err, SendError::TooFewBlindedHops);
208208
}
209209

@@ -214,19 +214,19 @@ fn reply_path() {
214214
let secp_ctx = Secp256k1::new();
215215

216216
// Destination::Node
217-
let reply_path = BlindedRoute::new(&[nodes[2].get_node_pk(), nodes[1].get_node_pk(), nodes[0].get_node_pk()], &*nodes[0].keys_manager, &secp_ctx).unwrap();
217+
let reply_path = BlindedPath::new(&[nodes[2].get_node_pk(), nodes[1].get_node_pk(), nodes[0].get_node_pk()], &*nodes[0].keys_manager, &secp_ctx).unwrap();
218218
nodes[0].messenger.send_onion_message(&[nodes[1].get_node_pk(), nodes[2].get_node_pk()], Destination::Node(nodes[3].get_node_pk()), OnionMessageContents::Custom(test_msg.clone()), Some(reply_path)).unwrap();
219219
pass_along_path(&nodes, None);
220220
// Make sure the last node successfully decoded the reply path.
221221
nodes[3].logger.assert_log_contains(
222222
"lightning::onion_message::messenger".to_string(),
223223
format!("Received an onion message with path_id None and a reply_path").to_string(), 1);
224224

225-
// Destination::BlindedRoute
226-
let blinded_route = BlindedRoute::new(&[nodes[1].get_node_pk(), nodes[2].get_node_pk(), nodes[3].get_node_pk()], &*nodes[3].keys_manager, &secp_ctx).unwrap();
227-
let reply_path = BlindedRoute::new(&[nodes[2].get_node_pk(), nodes[1].get_node_pk(), nodes[0].get_node_pk()], &*nodes[0].keys_manager, &secp_ctx).unwrap();
225+
// Destination::BlindedPath
226+
let blinded_route = BlindedPath::new(&[nodes[1].get_node_pk(), nodes[2].get_node_pk(), nodes[3].get_node_pk()], &*nodes[3].keys_manager, &secp_ctx).unwrap();
227+
let reply_path = BlindedPath::new(&[nodes[2].get_node_pk(), nodes[1].get_node_pk(), nodes[0].get_node_pk()], &*nodes[0].keys_manager, &secp_ctx).unwrap();
228228

229-
nodes[0].messenger.send_onion_message(&[], Destination::BlindedRoute(blinded_route), OnionMessageContents::Custom(test_msg), Some(reply_path)).unwrap();
229+
nodes[0].messenger.send_onion_message(&[], Destination::BlindedPath(blinded_route), OnionMessageContents::Custom(test_msg), Some(reply_path)).unwrap();
230230
pass_along_path(&nodes, None);
231231
nodes[3].logger.assert_log_contains(
232232
"lightning::onion_message::messenger".to_string(),

lightning/src/onion_message/messenger.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::ln::features::{InitFeatures, NodeFeatures};
2020
use crate::ln::msgs::{self, OnionMessageHandler};
2121
use crate::ln::onion_utils;
2222
use crate::ln::peer_handler::IgnoringMessageHandler;
23-
use super::blinded_route::{BlindedRoute, ForwardTlvs, ReceiveTlvs};
23+
use super::blinded_route::{BlindedPath, ForwardTlvs, ReceiveTlvs};
2424
pub use super::packet::{CustomOnionMessageContents, OnionMessageContents};
2525
use super::packet::{BIG_PACKET_HOP_DATA_LEN, ForwardControlTlvs, Packet, Payload, ReceiveControlTlvs, SMALL_PACKET_HOP_DATA_LEN};
2626
use super::utils;
@@ -46,7 +46,7 @@ use crate::prelude::*;
4646
/// # use lightning::chain::keysinterface::{InMemorySigner, KeysManager, KeysInterface};
4747
/// # use lightning::ln::msgs::DecodeError;
4848
/// # use lightning::ln::peer_handler::IgnoringMessageHandler;
49-
/// # use lightning::onion_message::{BlindedRoute, CustomOnionMessageContents, Destination, OnionMessageContents, OnionMessenger};
49+
/// # use lightning::onion_message::{BlindedPath, CustomOnionMessageContents, Destination, OnionMessageContents, OnionMessenger};
5050
/// # use lightning::util::logger::{Logger, Record};
5151
/// # use lightning::util::ser::{Writeable, Writer};
5252
/// # use lightning::io;
@@ -92,14 +92,14 @@ use crate::prelude::*;
9292
/// // Create a blinded route to yourself, for someone to send an onion message to.
9393
/// # let your_node_id = hop_node_id1;
9494
/// let hops = [hop_node_id3, hop_node_id4, your_node_id];
95-
/// let blinded_route = BlindedRoute::new(&hops, &keys_manager, &secp_ctx).unwrap();
95+
/// let blinded_route = BlindedPath::new(&hops, &keys_manager, &secp_ctx).unwrap();
9696
///
9797
/// // Send a custom onion message to a blinded route.
9898
/// # let intermediate_hops = [hop_node_id1, hop_node_id2];
9999
/// let reply_path = None;
100100
/// # let your_custom_message = YourCustomMessage {};
101101
/// let message = OnionMessageContents::Custom(your_custom_message);
102-
/// onion_messenger.send_onion_message(&intermediate_hops, Destination::BlindedRoute(blinded_route), message, reply_path);
102+
/// onion_messenger.send_onion_message(&intermediate_hops, Destination::BlindedPath(blinded_route), message, reply_path);
103103
/// ```
104104
///
105105
/// [offers]: <https://github.com/lightning/bolts/pull/798>
@@ -123,14 +123,14 @@ pub enum Destination {
123123
/// We're sending this onion message to a node.
124124
Node(PublicKey),
125125
/// We're sending this onion message to a blinded route.
126-
BlindedRoute(BlindedRoute),
126+
BlindedPath(BlindedPath),
127127
}
128128

129129
impl Destination {
130130
pub(super) fn num_hops(&self) -> usize {
131131
match self {
132132
Destination::Node(_) => 1,
133-
Destination::BlindedRoute(BlindedRoute { blinded_hops, .. }) => blinded_hops.len(),
133+
Destination::BlindedPath(BlindedPath { blinded_hops, .. }) => blinded_hops.len(),
134134
}
135135
}
136136
}
@@ -145,7 +145,7 @@ pub enum SendError {
145145
/// Because implementations such as Eclair will drop onion messages where the message packet
146146
/// exceeds 32834 bytes, we refuse to send messages where the packet exceeds this size.
147147
TooBigPacket,
148-
/// The provided [`Destination`] was an invalid [`BlindedRoute`], due to having fewer than two
148+
/// The provided [`Destination`] was an invalid [`BlindedPath`], due to having fewer than two
149149
/// blinded hops.
150150
TooFewBlindedHops,
151151
/// Our next-hop peer was offline or does not support onion message forwarding.
@@ -162,7 +162,7 @@ pub enum SendError {
162162
/// advance the blinded route to make the second hop the new introduction node. Either
163163
/// [`KeysInterface::ecdh`] failed, we failed to tweak the current blinding point to get the
164164
/// new blinding point, or we were attempting to send to ourselves.
165-
BlindedRouteAdvanceFailed,
165+
BlindedPathAdvanceFailed,
166166
}
167167

168168
/// Handler for custom onion messages. If you are using [`SimpleArcOnionMessenger`],
@@ -207,8 +207,8 @@ impl<K: Deref, L: Deref, CMH: Deref> OnionMessenger<K, L, CMH>
207207

208208
/// Send an onion message with contents `message` to `destination`, routing it through `intermediate_nodes`.
209209
/// See [`OnionMessenger`] for example usage.
210-
pub fn send_onion_message<T: CustomOnionMessageContents>(&self, intermediate_nodes: &[PublicKey], mut destination: Destination, message: OnionMessageContents<T>, reply_path: Option<BlindedRoute>) -> Result<(), SendError> {
211-
if let Destination::BlindedRoute(BlindedRoute { ref blinded_hops, .. }) = destination {
210+
pub fn send_onion_message<T: CustomOnionMessageContents>(&self, intermediate_nodes: &[PublicKey], mut destination: Destination, message: OnionMessageContents<T>, reply_path: Option<BlindedPath>) -> Result<(), SendError> {
211+
if let Destination::BlindedPath(BlindedPath { ref blinded_hops, .. }) = destination {
212212
if blinded_hops.len() < 2 {
213213
return Err(SendError::TooFewBlindedHops);
214214
}
@@ -219,12 +219,12 @@ impl<K: Deref, L: Deref, CMH: Deref> OnionMessenger<K, L, CMH>
219219
// If we are sending straight to a blinded route and we are the introduction node, we need to
220220
// advance the blinded route by 1 hop so the second hop is the new introduction node.
221221
if intermediate_nodes.len() == 0 {
222-
if let Destination::BlindedRoute(ref mut blinded_route) = destination {
222+
if let Destination::BlindedPath(ref mut blinded_route) = destination {
223223
let our_node_id = self.keys_manager.get_node_id(Recipient::Node)
224224
.map_err(|()| SendError::GetNodeIdFailed)?;
225225
if blinded_route.introduction_node_id == our_node_id {
226226
blinded_route.advance_by_one(&self.keys_manager, &self.secp_ctx)
227-
.map_err(|()| SendError::BlindedRouteAdvanceFailed)?;
227+
.map_err(|()| SendError::BlindedPathAdvanceFailed)?;
228228
}
229229
}
230230
}
@@ -236,7 +236,7 @@ impl<K: Deref, L: Deref, CMH: Deref> OnionMessenger<K, L, CMH>
236236
} else {
237237
match destination {
238238
Destination::Node(pk) => (pk, PublicKey::from_secret_key(&self.secp_ctx, &blinding_secret)),
239-
Destination::BlindedRoute(BlindedRoute { introduction_node_id, blinding_point, .. }) =>
239+
Destination::BlindedPath(BlindedPath { introduction_node_id, blinding_point, .. }) =>
240240
(introduction_node_id, blinding_point),
241241
}
242242
};
@@ -476,13 +476,13 @@ pub type SimpleRefOnionMessenger<'a, 'b, L> = OnionMessenger<&'a KeysManager, &'
476476
/// `unblinded_path` to the given `destination`.
477477
fn packet_payloads_and_keys<T: CustomOnionMessageContents, S: secp256k1::Signing + secp256k1::Verification>(
478478
secp_ctx: &Secp256k1<S>, unblinded_path: &[PublicKey], destination: Destination,
479-
message: OnionMessageContents<T>, mut reply_path: Option<BlindedRoute>, session_priv: &SecretKey
479+
message: OnionMessageContents<T>, mut reply_path: Option<BlindedPath>, session_priv: &SecretKey
480480
) -> Result<(Vec<(Payload<T>, [u8; 32])>, Vec<onion_utils::OnionKeys>), secp256k1::Error> {
481481
let num_hops = unblinded_path.len() + destination.num_hops();
482482
let mut payloads = Vec::with_capacity(num_hops);
483483
let mut onion_packet_keys = Vec::with_capacity(num_hops);
484484

485-
let (mut intro_node_id_blinding_pt, num_blinded_hops) = if let Destination::BlindedRoute(BlindedRoute {
485+
let (mut intro_node_id_blinding_pt, num_blinded_hops) = if let Destination::BlindedPath(BlindedPath {
486486
introduction_node_id, blinding_point, blinded_hops }) = &destination {
487487
(Some((*introduction_node_id, *blinding_point)), blinded_hops.len()) } else { (None, 0) };
488488
let num_unblinded_hops = num_hops - num_blinded_hops;

lightning/src/onion_message/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! information on its usage.
1919
//!
2020
//! [offers]: <https://github.com/lightning/bolts/pull/798>
21-
//! [blinded routes]: crate::onion_message::BlindedRoute
21+
//! [blinded routes]: crate::onion_message::BlindedPath
2222
2323
mod blinded_route;
2424
mod messenger;
@@ -28,6 +28,6 @@ mod utils;
2828
mod functional_tests;
2929

3030
// Re-export structs so they can be imported with just the `onion_message::` module prefix.
31-
pub use self::blinded_route::{BlindedRoute, BlindedRoute as BlindedPath, BlindedHop};
31+
pub use self::blinded_route::{BlindedPath, BlindedHop};
3232
pub use self::messenger::{CustomOnionMessageContents, CustomOnionMessageHandler, Destination, OnionMessageContents, OnionMessenger, SendError, SimpleArcOnionMessenger, SimpleRefOnionMessenger};
3333
pub(crate) use self::packet::Packet;

lightning/src/onion_message/packet.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use bitcoin::secp256k1::ecdh::SharedSecret;
1414

1515
use crate::ln::msgs::DecodeError;
1616
use crate::ln::onion_utils;
17-
use super::blinded_route::{BlindedRoute, ForwardTlvs, ReceiveTlvs};
17+
use super::blinded_route::{BlindedPath, ForwardTlvs, ReceiveTlvs};
1818
use super::messenger::CustomOnionMessageHandler;
1919
use crate::util::chacha20poly1305rfc::{ChaChaPolyReadAdapter, ChaChaPolyWriteAdapter};
2020
use crate::util::ser::{BigSize, FixedLengthReader, LengthRead, LengthReadable, LengthReadableArgs, Readable, ReadableArgs, Writeable, Writer};
@@ -99,7 +99,7 @@ pub(super) enum Payload<T: CustomOnionMessageContents> {
9999
/// This payload is for the final hop.
100100
Receive {
101101
control_tlvs: ReceiveControlTlvs,
102-
reply_path: Option<BlindedRoute>,
102+
reply_path: Option<BlindedPath>,
103103
message: OnionMessageContents<T>,
104104
}
105105
}
@@ -204,7 +204,7 @@ impl<H: CustomOnionMessageHandler> ReadableArgs<(SharedSecret, &H)> for Payload<
204204

205205
let v: BigSize = Readable::read(r)?;
206206
let mut rd = FixedLengthReader::new(r, v.0);
207-
let mut reply_path: Option<BlindedRoute> = None;
207+
let mut reply_path: Option<BlindedPath> = None;
208208
let mut read_adapter: Option<ChaChaPolyReadAdapter<ControlTlvs>> = None;
209209
let rho = onion_utils::gen_rho_from_shared_secret(&encrypted_tlvs_ss.secret_bytes());
210210
let mut message_type: Option<u64> = None;

lightning/src/onion_message/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use bitcoin::secp256k1::{self, PublicKey, Secp256k1, SecretKey, Scalar};
1616
use bitcoin::secp256k1::ecdh::SharedSecret;
1717

1818
use crate::ln::onion_utils;
19-
use super::blinded_route::BlindedRoute;
19+
use super::blinded_route::BlindedPath;
2020
use super::messenger::Destination;
2121

2222
use crate::prelude::*;
@@ -87,7 +87,7 @@ pub(super) fn construct_keys_callback<T: secp256k1::Signing + secp256k1::Verific
8787
Destination::Node(pk) => {
8888
build_keys!(pk, false, None);
8989
},
90-
Destination::BlindedRoute(BlindedRoute { blinded_hops, .. }) => {
90+
Destination::BlindedPath(BlindedPath { blinded_hops, .. }) => {
9191
for hop in blinded_hops {
9292
build_keys_in_loop!(hop.blinded_node_id, true, Some(hop.encrypted_payload));
9393
}

0 commit comments

Comments
 (0)