Skip to content

Commit 974ffeb

Browse files
committed
Be more pedantically correct in offer/refund builder documentation
Instead of making vague reference to "those docs", indicate exactly which docs we're suggesting the user go hunt for. Also, for variant methods, just say "see the original method for more details" rather than trying to spell out all the things that exist in the documentation for the other method. This avoids things getting stale and doesn't reduce the information users have.
1 parent 0c4245a commit 974ffeb

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11554,6 +11554,9 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => {
1155411554
///
1155511555
/// # Privacy
1155611556
///
11557+
/// Uses [`MessageRouter`] provided at construction to construct a [`BlindedMessagePath`] for
11558+
/// the offer. See the documentation of the selected [`MessageRouter`] for details on how it
11559+
/// selects blinded paths including privacy implications and reliability tradeoffs.
1155711560
/// Uses the [`MessageRouter`] provided to the [`ChannelManager`] at construction to build a
1155811561
/// [`BlindedMessagePath`] for the offer. See those docs for privacy implications.
1155911562
///
@@ -11584,7 +11587,7 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => {
1158411587
/// This gives users full control over how the [`BlindedMessagePath`] is constructed,
1158511588
/// including the option to omit it entirely.
1158611589
///
11587-
/// See [`Self::create_offer_builder`] for details on offer construction, privacy, and limitations.
11590+
/// See [`Self::create_offer_builder`] for more details on usage.
1158811591
///
1158911592
/// [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath
1159011593
/// [`Offer`]: crate::offers::offer::Offer
@@ -11627,9 +11630,9 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
1162711630
///
1162811631
/// # Privacy
1162911632
///
11630-
/// Uses [`MessageRouter`] to construct a [`BlindedMessagePath`] for the refund based on the given
11631-
/// `absolute_expiry` according to [`MAX_SHORT_LIVED_RELATIVE_EXPIRY`]. See those docs for
11632-
/// privacy implications.
11633+
/// Uses [`MessageRouter`] provided at construction to construct a [`BlindedMessagePath`] for
11634+
/// the refund. See the documentation of the selected [`MessageRouter`] for details on how it
11635+
/// selects blinded paths including privacy implications and reliability tradeoffs.
1163311636
///
1163411637
/// Also, uses a derived payer id in the refund for payer privacy.
1163511638
///
@@ -11676,12 +11679,7 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
1167611679
/// refund, including the option to omit it entirely. This is useful for testing or when
1167711680
/// alternative privacy strategies are needed.
1167811681
///
11679-
/// See [`Self::create_refund_builder`] for:
11680-
/// - refund recognition by [`ChannelManager`] via [`Bolt12Invoice`] handling,
11681-
/// - `payment_id` rules and expiration behavior,
11682-
/// - invoice revocation and refund failure handling,
11683-
/// - defaulting behavior for `max_total_routing_fee_msat`,
11684-
/// - and detailed payment and privacy semantics.
11682+
/// See [`Self::create_refund_builder`] for more details on usage.
1168511683
///
1168611684
/// # Errors
1168711685
///

lightning/src/offers/flow.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,9 @@ where
562562
///
563563
/// # Privacy
564564
///
565-
/// Uses the [`OffersMessageFlow`]'s [`MessageRouter`] to construct a [`BlindedMessagePath`]
566-
/// for the offer. See those docs for privacy implications.
565+
/// Uses [`MessageRouter`] provided at construction to construct a [`BlindedMessagePath`] for
566+
/// the offer. See the documentation of the selected [`MessageRouter`] for details on how it
567+
/// selects blinded paths including privacy implications and reliability tradeoffs.
567568
///
568569
/// Also uses a derived signing pubkey in the offer for recipient privacy.
569570
///
@@ -598,7 +599,7 @@ where
598599
/// This gives users full control over how the [`BlindedMessagePath`] is constructed,
599600
/// including the option to omit it entirely.
600601
///
601-
/// See [`Self::create_offer_builder`] for details on offer construction, privacy, and limitations.
602+
/// See [`Self::create_offer_builder`] for more details on usage.
602603
pub fn create_offer_builder_using_router<ME: Deref, ES: Deref>(
603604
&self, router: ME, entropy_source: ES, peers: Vec<MessageForwardNode>,
604605
) -> Result<OfferBuilder<DerivedMetadata, secp256k1::All>, Bolt12SemanticError>
@@ -682,8 +683,9 @@ where
682683
///
683684
/// # Privacy
684685
///
685-
/// Uses the [`OffersMessageFlow`]'s [`MessageRouter`] to construct a [`BlindedMessagePath`]
686-
/// for the offer. See those docs for privacy implications.
686+
/// Uses [`MessageRouter`] provided at construction to construct a [`BlindedMessagePath`] for
687+
/// the refund. See the documentation of the selected [`MessageRouter`] for details on how it
688+
/// selects blinded paths including privacy implications and reliability tradeoffs.
687689
///
688690
/// The builder will have the provided expiration set. Any changes to the expiration on the
689691
/// returned builder will not be honored by [`OffersMessageFlow`]. For non-`std`, the highest seen
@@ -734,11 +736,7 @@ where
734736
/// This gives users full control over how the [`BlindedMessagePath`] is constructed,
735737
/// including the option to omit it entirely.
736738
///
737-
/// See [`Self::create_refund_builder`] for:
738-
/// - how the resulting [`Refund`] is recognized by [`OffersMessageFlow`] and verified via [`Self::verify_bolt12_invoice`],
739-
/// - refund expiration handling,
740-
/// - rules around revocation and [`Event::PaymentFailed`] behavior,
741-
/// - and defaulting logic for `max_total_routing_fee_msat`.
739+
/// See [`Self::create_refund_builder`] for more details on usage.
742740
///
743741
/// # Errors
744742
///

0 commit comments

Comments
 (0)