Skip to content

Commit 9cafede

Browse files
Merge pull request #2340 from TheBlueMatt/2023-06-fix-docs
Remove spurious docs which imply you cannot retry a failed payment
2 parents 486c16a + 60ce627 commit 9cafede

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lightning-invoice/src/payment.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ use core::time::Duration;
2828
/// Pays the given [`Invoice`], retrying if needed based on [`Retry`].
2929
///
3030
/// [`Invoice::payment_hash`] is used as the [`PaymentId`], which ensures idempotency as long
31-
/// as the payment is still pending. Once the payment completes or fails, you must ensure that
32-
/// a second payment with the same [`PaymentHash`] is never sent.
31+
/// as the payment is still pending. If the payment succeeds, you must ensure that a second payment
32+
/// with the same [`PaymentHash`] is never sent.
3333
///
3434
/// If you wish to use a different payment idempotency token, see [`pay_invoice_with_id`].
3535
pub fn pay_invoice<M: Deref, T: Deref, ES: Deref, NS: Deref, SP: Deref, F: Deref, R: Deref, L: Deref>(
@@ -82,8 +82,8 @@ where
8282
/// [`Retry`].
8383
///
8484
/// [`Invoice::payment_hash`] is used as the [`PaymentId`], which ensures idempotency as long
85-
/// as the payment is still pending. Once the payment completes or fails, you must ensure that
86-
/// a second payment with the same [`PaymentHash`] is never sent.
85+
/// as the payment is still pending. If the payment succeeds, you must ensure that a second payment
86+
/// with the same [`PaymentHash`] is never sent.
8787
///
8888
/// If you wish to use a different payment idempotency token, see
8989
/// [`pay_zero_value_invoice_with_id`].
@@ -108,7 +108,7 @@ where
108108
}
109109

110110
/// Pays the given zero-value [`Invoice`] using the given amount and custom idempotency key,
111-
/// , retrying if needed based on [`Retry`].
111+
/// retrying if needed based on [`Retry`].
112112
///
113113
/// Note that idempotency is only guaranteed as long as the payment is still pending. Once the
114114
/// payment completes or fails, no idempotency guarantees are made.

0 commit comments

Comments
 (0)