From: Valentine Wallace Date: Mon, 5 Aug 2024 23:30:31 +0000 (-0700) Subject: Expose blinded paths' advance_path_by_one methods. X-Git-Tag: v0.0.124-beta~10^2~9 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=4dba7a314ce175f9e5fd51856c914b11923738ed;p=rust-lightning Expose blinded paths' advance_path_by_one methods. Useful for LDK users that are using the onion messages module, like LNDK. --- diff --git a/lightning/src/blinded_path/message.rs b/lightning/src/blinded_path/message.rs index 846886dcc..0b575e842 100644 --- a/lightning/src/blinded_path/message.rs +++ b/lightning/src/blinded_path/message.rs @@ -258,11 +258,11 @@ pub(super) fn blinded_hops( 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( +/// 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( path: &mut BlindedMessagePath, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1 ) -> Result<(), ()> where diff --git a/lightning/src/blinded_path/payment.rs b/lightning/src/blinded_path/payment.rs index a7191656a..27033c058 100644 --- a/lightning/src/blinded_path/payment.rs +++ b/lightning/src/blinded_path/payment.rs @@ -341,11 +341,11 @@ pub(super) fn blinded_hops( 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( +/// 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( path: &mut BlindedPaymentPath, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1 ) -> Result<(), ()> where