From 7964b9f745a18c1abeabb11b165bb588ef1474f2 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Mon, 19 Dec 2022 22:33:01 -0600 Subject: [PATCH] Correct documentation about Refund::payer_id The docs incorrectly stated that Refund::payer_id is for signing, where it is only used for identifying a node if Refund::paths is not present. --- lightning/src/offers/refund.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lightning/src/offers/refund.rs b/lightning/src/offers/refund.rs index 4e553cb3e..d3798463b 100644 --- a/lightning/src/offers/refund.rs +++ b/lightning/src/offers/refund.rs @@ -102,8 +102,8 @@ pub struct RefundBuilder { } impl RefundBuilder { - /// Creates a new builder for a refund using the [`Refund::payer_id`] for signing invoices. Use - /// a different pubkey per refund to avoid correlating refunds. + /// Creates a new builder for a refund using the [`Refund::payer_id`] for the public node id to + /// send to if no [`Refund::paths`] are set. Otherwise, it may be a transient pubkey. /// /// Additionally, sets the required [`Refund::description`], [`Refund::metadata`], and /// [`Refund::amount_msats`]. @@ -285,7 +285,10 @@ impl Refund { &self.contents.features } - /// A possibly transient pubkey used to sign the refund. + /// A public node id to send to in the case where there are no [`paths`]. Otherwise, a possibly + /// transient pubkey. + /// + /// [`paths`]: Self::paths pub fn payer_id(&self) -> PublicKey { self.contents.payer_id } -- 2.39.5