Skip to content

Commit bab039d

Browse files
committed
Remove spurious docs which imply you cannot retry a failed payment
If a payment (fully) fails, users are free to retry it, its only once a payment succeeds that a user must never retry it.
1 parent 166f326 commit bab039d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning-invoice/src/payment.rs

Lines changed: 4 additions & 4 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. Once the payment completes, you must ensure that a second
32+
/// payment 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. Once the payment completes, you must ensure that a second
86+
/// payment 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`].

0 commit comments

Comments
 (0)