From: Jeffrey Czyz Date: Tue, 20 Dec 2022 04:33:01 +0000 (-0600) Subject: Correct documentation about Refund::payer_id X-Git-Tag: v0.0.114-beta~72^2~4 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=7964b9f745a18c1abeabb11b165bb588ef1474f2;p=rust-lightning 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. --- 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 }