Skip to content

Commit 1643fca

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 91105df commit 1643fca

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
@@ -8564,10 +8564,14 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => {
85648564
///
85658565
/// Uses [`MessageRouter`] to construct a [`BlindedPath`] for the offer based on the given
85668566
/// `absolute_expiry` according to [`MAX_SHORT_LIVED_RELATIVE_EXPIRY`]. See those docs for
8567-
/// privacy implications. However, if one is not found, uses a one-hop [`BlindedPath`] with
8568-
/// [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case,
8569-
/// the node must be announced, otherwise, there is no way to find a path to the introduction
8570-
/// node in order to send the [`InvoiceRequest`].
8567+
/// privacy implications.
8568+
///
8569+
/// The [`Router`] used to parameterized [`ChannelManager`] may also affect privacy since it
8570+
/// implements [`MessageRouter`]. If parameterized with [`DefaultRouter`], it will delegate to
8571+
/// [`DefaultMessageRouter`]. In that case, it may return a one-hop [`BlindedPath`] with
8572+
/// [`ChannelManager::get_our_node_id`] as the introduction node if no other path can be found
8573+
/// *and* the node is announced. Otherwise, there is no way to find a path to the introduction
8574+
/// in order to send the [`InvoiceRequest`].
85718575
///
85728576
/// Also, uses a derived signing pubkey in the offer for recipient privacy.
85738577
///
@@ -8632,10 +8636,14 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
86328636
///
86338637
/// Uses [`MessageRouter`] to construct a [`BlindedPath`] for the refund based on the given
86348638
/// `absolute_expiry` according to [`MAX_SHORT_LIVED_RELATIVE_EXPIRY`]. See those docs for
8635-
/// privacy implications. However, if one is not found, uses a one-hop [`BlindedPath`] with
8636-
/// [`ChannelManager::get_our_node_id`] as the introduction node instead. In the latter case,
8637-
/// the node must be announced, otherwise, there is no way to find a path to the introduction
8638-
/// node in order to send the [`Bolt12Invoice`].
8639+
/// privacy implications.
8640+
///
8641+
/// The [`Router`] used to parameterized [`ChannelManager`] may also affect privacy since it
8642+
/// implements [`MessageRouter`]. If parameterized with [`DefaultRouter`], it will delegate to
8643+
/// [`DefaultMessageRouter`]. In that case, it may return a one-hop [`BlindedPath`] with
8644+
/// [`ChannelManager::get_our_node_id`] as the introduction node if no other path can be found
8645+
/// *and* the node is announced. Otherwise, there is no way to find a path to the introduction
8646+
/// in order to send the [`Bolt12Invoice`].
86398647
///
86408648
/// Also, uses a derived payer id in the refund for payer privacy.
86418649
///

0 commit comments

Comments
 (0)