Skip to content

Commit 08a39c5

Browse files
Expose blinded paths' advance_path_by_one methods.
Useful for LDK users that are using the onion messages module, like LNDK.
1 parent a889642 commit 08a39c5

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lightning/src/blinded_path/message.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,11 @@ pub(super) fn blinded_hops<T: secp256k1::Signing + secp256k1::Verification>(
242242
utils::construct_blinded_hops(secp_ctx, pks, tlvs, session_priv)
243243
}
244244

245-
// Advance the blinded onion message path by one hop, so make the second hop into the new
246-
// introduction node.
247-
//
248-
// Will only modify `path` when returning `Ok`.
249-
pub(crate) fn advance_path_by_one<NS: Deref, NL: Deref, T>(
245+
/// Advance the blinded onion message path by one hop, so make the second hop into the new
246+
/// introduction node.
247+
///
248+
/// Will only modify `path` when returning `Ok`.
249+
pub fn advance_path_by_one<NS: Deref, NL: Deref, T>(
250250
path: &mut BlindedMessagePath, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1<T>
251251
) -> Result<(), ()>
252252
where

lightning/src/blinded_path/payment.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,11 @@ pub(super) fn blinded_hops<T: secp256k1::Signing + secp256k1::Verification>(
327327
utils::construct_blinded_hops(secp_ctx, pks, tlvs, session_priv)
328328
}
329329

330-
// Advance the blinded onion payment path by one hop, so make the second hop into the new
331-
// introduction node.
332-
//
333-
// Will only modify `path` when returning `Ok`.
334-
pub(crate) fn advance_path_by_one<NS: Deref, NL: Deref, T>(
330+
/// Advance the blinded onion payment path by one hop, so make the second hop into the new
331+
/// introduction node.
332+
///
333+
/// Will only modify `path` when returning `Ok`.
334+
pub fn advance_path_by_one<NS: Deref, NL: Deref, T>(
335335
path: &mut BlindedPaymentPath, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1<T>
336336
) -> Result<(), ()>
337337
where

0 commit comments

Comments
 (0)