Skip to content

Commit f23b75a

Browse files
committed
Improve payment-id docs
1 parent abceb1b commit f23b75a

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ impl From<&ClaimableHTLC> for events::ClaimedHTLC {
233233
}
234234
}
235235

236-
/// A payment identifier used to uniquely identify a payment to LDK.
236+
/// A user-provided identifier in [`ChannelManager::send_payment`] used to uniquely identify
237+
/// a payment and ensure idempotency in LDK.
237238
///
238239
/// This is not exported to bindings users as we just use [u8; 32] directly
239240
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug)]
@@ -1669,12 +1670,14 @@ pub enum ChannelShutdownState {
16691670
pub enum RecentPaymentDetails {
16701671
/// When an invoice was requested and thus a payment has not yet been sent.
16711672
AwaitingInvoice {
1672-
/// Identifier for the payment to ensure idempotency.
1673+
/// A user-provided identifier in [`ChannelManager::send_payment`] used to uniquely identify
1674+
/// a payment and ensure idempotency in LDK.
16731675
payment_id: PaymentId,
16741676
},
16751677
/// When a payment is still being sent and awaiting successful delivery.
16761678
Pending {
1677-
/// Identifier for the payment to ensure idempotency.
1679+
/// A user-provided identifier in [`ChannelManager::send_payment`] used to uniquely identify
1680+
/// a payment and ensure idempotency in LDK.
16781681
payment_id: PaymentId,
16791682
/// Hash of the payment that is currently being sent but has yet to be fulfilled or
16801683
/// abandoned.
@@ -1687,7 +1690,8 @@ pub enum RecentPaymentDetails {
16871690
/// been resolved. Upon receiving [`Event::PaymentSent`], we delay for a few minutes before the
16881691
/// payment is removed from tracking.
16891692
Fulfilled {
1690-
/// Identifier for the payment to ensure idempotency.
1693+
/// A user-provided identifier in [`ChannelManager::send_payment`] used to uniquely identify
1694+
/// a payment and ensure idempotency in LDK.
16911695
payment_id: PaymentId,
16921696
/// Hash of the payment that was claimed. `None` for serializations of [`ChannelManager`]
16931697
/// made before LDK version 0.0.104.
@@ -1697,7 +1701,8 @@ pub enum RecentPaymentDetails {
16971701
/// abandoned via [`ChannelManager::abandon_payment`], it is marked as abandoned until all
16981702
/// pending HTLCs for this payment resolve and an [`Event::PaymentFailed`] is generated.
16991703
Abandoned {
1700-
/// Identifier for the payment to ensure idempotency.
1704+
/// A user-provided identifier in [`ChannelManager::send_payment`] used to uniquely identify
1705+
/// a payment and ensure idempotency in LDK.
17011706
payment_id: PaymentId,
17021707
/// Hash of the payment that we have given up trying to send.
17031708
payment_hash: PaymentHash,

0 commit comments

Comments
 (0)