From 25082117cc73d1706a24af9343b75f90c768920d Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Wed, 20 Sep 2023 11:06:29 -0500 Subject: [PATCH] f - fix/update pay_for_offer docs --- lightning/src/ln/channelmanager.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 2efa6dacba4..65851f8d75e 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -6891,18 +6891,22 @@ where /// Uses [`InvoiceRequestBuilder`] such that the [`InvoiceRequest`] it builds is recognized by /// the [`ChannelManager`] when handling a [`Bolt12Invoice`] message for the request. The /// optional parameters are used in the builder, if `Some`: - /// - `quantity` for [`InvoiceRequest::quantity`] which may be set if + /// - `quantity` for [`InvoiceRequest::quantity`] which must be set if /// [`Offer::expects_quantity`] is `true`. /// - `amount_msats` if overpaying what is required for the given `quantity` is desired, and /// - `payer_note` for [`InvoiceRequest::payer_note`]. /// - /// The provided `payment_id` is used to ensure that only one invoice is paid for the request. + /// The provided `payment_id` is used to ensure that only one invoice is paid for the request + /// when received. See [Avoiding Duplicate Payments] for other requirements once the payment has + /// been sent. Errors if a duplicate `payment_id` is provided given the caveats in the + /// aforementioned link. /// /// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest /// [`InvoiceRequest::quantity`]: crate::offers::invoice_request::InvoiceRequest::quantity /// [`InvoiceRequest::payer_note`]: crate::offers::invoice_request::InvoiceRequest::payer_note /// [`InvoiceRequestBuilder`]: crate::offers::invoice_request::InvoiceRequestBuilder /// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice + /// [Avoiding Duplicate Payments]: #avoiding-duplicate-payments pub fn pay_for_offer( &self, offer: &Offer, quantity: Option, amount_msats: Option, payer_note: Option, payment_id: PaymentId, retry_strategy: Retry