Skip to content

Commit 91105df

Browse files
committed
f - expand docs
1 parent 1de7279 commit 91105df

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2292,6 +2292,11 @@ const MAX_NO_CHANNEL_PEERS: usize = 250;
22922292
/// will included a [`BlindedPath`] created using:
22932293
/// - [`MessageRouter::create_compact_blinded_paths`] when short-lived, and
22942294
/// - [`MessageRouter::create_blinded_paths`] when long-lived.
2295+
///
2296+
/// Using compact [`BlindedPath`]s may provide better privacy as more hops can be used with the same
2297+
/// amount of bytes. However, since they use short channel ids instead of pubkeys, they are more
2298+
/// likely to become invalid over time as channels are closed. Thus, they are only suitable for
2299+
/// short-term use.
22952300
pub const MAX_SHORT_LIVED_RELATIVE_EXPIRY: Duration = Duration::from_secs(60 * 60 * 24);
22962301

22972302
/// Information needed for constructing an invoice route hint for this channel.
@@ -8558,10 +8563,11 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => {
85588563
/// # Privacy
85598564
///
85608565
/// Uses [`MessageRouter`] to construct a [`BlindedPath`] for the offer based on the given
8561-
/// `absolute_expiry` according to [`MAX_SHORT_LIVED_RELATIVE_EXPIRY`]. However, if one is not
8562-
/// found, uses a one-hop [`BlindedPath`] with [`ChannelManager::get_our_node_id`] as the
8563-
/// introduction node instead. In the latter case, the node must be announced, otherwise, there
8564-
/// is no way to find a path to the introduction in order to send the [`InvoiceRequest`].
8566+
/// `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`].
85658571
///
85668572
/// Also, uses a derived signing pubkey in the offer for recipient privacy.
85678573
///
@@ -8625,10 +8631,11 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
86258631
/// # Privacy
86268632
///
86278633
/// Uses [`MessageRouter`] to construct a [`BlindedPath`] for the refund based on the given
8628-
/// `absolute_expiry` according to [`MAX_SHORT_LIVED_RELATIVE_EXPIRY`]. However, if one is not
8629-
/// found, uses a one-hop [`BlindedPath`] with [`ChannelManager::get_our_node_id`] as the
8630-
/// introduction node instead. In the latter case, the node must be announced, otherwise, there
8631-
/// is no way to find a path to the introduction in order to send the [`Bolt12Invoice`].
8634+
/// `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`].
86328639
///
86338640
/// Also, uses a derived payer id in the refund for payer privacy.
86348641
///

0 commit comments

Comments
 (0)