Skip to content

Commit

Permalink
Clarify docs regarding one-hop blinded paths
Browse files Browse the repository at this point in the history
The docs assumed ChannelManager is parameterized by DefaultRouter, which
may not be the case. Clarify the behavior is specific to using
DefaultRouter.
  • Loading branch information
jkczyz committed May 30, 2024
1 parent 2149018 commit 51036ec
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions lightning/src/ln/channelmanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8558,10 +8558,11 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => {
/// # Privacy
///
/// Uses [`MessageRouter`] to construct a [`BlindedPath`] for the offer based on the given
/// `absolute_expiry` according to [`MAX_SHORT_LIVED_RELATIVE_EXPIRY`]. However, if one is not
/// found, uses a one-hop [`BlindedPath`] with [`ChannelManager::get_our_node_id`] as the
/// introduction node instead. In the latter case, the node must be announced, otherwise, there
/// is no way to find a path to the introduction in order to send the [`InvoiceRequest`].
/// `absolute_expiry` according to [`MAX_SHORT_LIVED_RELATIVE_EXPIRY`]. When parameterized by
/// [`DefaultRouter`] (and thus using [`DefaultMessageRouter`), however, if a path is not found,
/// uses a one-hop [`BlindedPath`] with [`ChannelManager::get_our_node_id`] as the introduction
/// node instead. In the latter case, the node must be announced, otherwise, there is no way to
/// find a path to the introduction in order to send the [`InvoiceRequest`].
///
/// Also, uses a derived signing pubkey in the offer for recipient privacy.
///
Expand Down Expand Up @@ -8625,10 +8626,11 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
/// # Privacy
///
/// Uses [`MessageRouter`] to construct a [`BlindedPath`] for the refund based on the given
/// `absolute_expiry` according to [`MAX_SHORT_LIVED_RELATIVE_EXPIRY`]. However, if one is not
/// found, uses a one-hop [`BlindedPath`] with [`ChannelManager::get_our_node_id`] as the
/// introduction node instead. In the latter case, the node must be announced, otherwise, there
/// is no way to find a path to the introduction in order to send the [`Bolt12Invoice`].
/// `absolute_expiry` according to [`MAX_SHORT_LIVED_RELATIVE_EXPIRY`]. When parameterized by
/// [`DefaultRouter`] (and thus using [`DefaultMessageRouter`), however, if a path is not found,
/// uses a one-hop [`BlindedPath`] with [`ChannelManager::get_our_node_id`] as the introduction
/// node instead. In the latter case, the node must be announced, otherwise, there is no way to
/// find a path to the introduction in order to send the [`Bolt12Invoice`].
///
/// Also, uses a derived payer id in the refund for payer privacy.
///
Expand Down

0 comments on commit 51036ec

Please sign in to comment.