Skip to content

Commit 984d45a

Browse files
committed
Clarify docs regarding one-hop blinded paths
The docs assumed ChannelManager is parameterized by DefaultRouter, which may not be the case. Clarify the behavior is specific to using DefaultRouter.
1 parent 65e551b commit 984d45a

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8563,10 +8563,14 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => {
85638563
///
85648564
/// Uses [`MessageRouter`] to construct a [`BlindedPath`] for the offer based on the given
85658565
/// `absolute_expiry` according to [`MAX_SHORT_LIVED_RELATIVE_EXPIRY`]. See those docs for
8566-
/// privacy implications. However, if one is not found, uses a one-hop [`BlindedPath`] with
8567-
/// [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case,
8568-
/// the node must be announced, otherwise, there is no way to find a path to the introduction
8569-
/// node in order to send the [`InvoiceRequest`].
8566+
/// privacy implications.
8567+
///
8568+
/// The [`Router`] used to parameterized [`ChannelManager`] may also affect privacy since it
8569+
/// implements [`MessageRouter`]. If parameterized with [`DefaultRouter`], it will delegate to
8570+
/// [`DefaultMessageRouter`]. In that case, it may return a one-hop [`BlindedPath`] with
8571+
/// [`ChannelManager::get_our_node_id`] as the introduction node if no other path can be found
8572+
/// *and* the node is announced. Otherwise, there is no way to find a path to the introduction
8573+
/// in order to send the [`InvoiceRequest`].
85708574
///
85718575
/// Also, uses a derived signing pubkey in the offer for recipient privacy.
85728576
///
@@ -8631,10 +8635,14 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
86318635
///
86328636
/// Uses [`MessageRouter`] to construct a [`BlindedPath`] for the refund based on the given
86338637
/// `absolute_expiry` according to [`MAX_SHORT_LIVED_RELATIVE_EXPIRY`]. See those docs for
8634-
/// privacy implications. However, if one is not found, uses a one-hop [`BlindedPath`] with
8635-
/// [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case,
8636-
/// the node must be announced, otherwise, there is no way to find a path to the introduction
8637-
/// node in order to send the [`Bolt12Invoice`].
8638+
/// privacy implications.
8639+
///
8640+
/// The [`Router`] used to parameterized [`ChannelManager`] may also affect privacy since it
8641+
/// implements [`MessageRouter`]. If parameterized with [`DefaultRouter`], it will delegate to
8642+
/// [`DefaultMessageRouter`]. In that case, it may return a one-hop [`BlindedPath`] with
8643+
/// [`ChannelManager::get_our_node_id`] as the introduction node if no other path can be found
8644+
/// *and* the node is announced. Otherwise, there is no way to find a path to the introduction
8645+
/// in order to send the [`Bolt12Invoice`].
86388646
///
86398647
/// Also, uses a derived payer id in the refund for payer privacy.
86408648
///

0 commit comments

Comments
 (0)