Skip to content

Commit

Permalink
Expose blinded paths' advance_path_by_one methods.
Browse files Browse the repository at this point in the history
Useful for LDK users that are using the onion messages module, like LNDK.
  • Loading branch information
valentinewallace committed Aug 6, 2024
1 parent a889642 commit 08a39c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions lightning/src/blinded_path/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ pub(super) fn blinded_hops<T: secp256k1::Signing + secp256k1::Verification>(
utils::construct_blinded_hops(secp_ctx, pks, tlvs, session_priv)
}

// Advance the blinded onion message path by one hop, so make the second hop into the new
// introduction node.
//
// Will only modify `path` when returning `Ok`.
pub(crate) fn advance_path_by_one<NS: Deref, NL: Deref, T>(
/// Advance the blinded onion message path by one hop, so make the second hop into the new
/// introduction node.
///
/// Will only modify `path` when returning `Ok`.
pub fn advance_path_by_one<NS: Deref, NL: Deref, T>(
path: &mut BlindedMessagePath, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1<T>
) -> Result<(), ()>
where
Expand Down
10 changes: 5 additions & 5 deletions lightning/src/blinded_path/payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,11 @@ pub(super) fn blinded_hops<T: secp256k1::Signing + secp256k1::Verification>(
utils::construct_blinded_hops(secp_ctx, pks, tlvs, session_priv)
}

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

0 comments on commit 08a39c5

Please sign in to comment.