Skip to content

Commit b4294ec

Browse files
committed
improve docs
1 parent 15aec58 commit b4294ec

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,9 @@ impl ChannelDetails {
12041204
}
12051205
}
12061206

1207-
/// Used to express the status of payments that are currently pending resolution.
1207+
/// Used to express the status of payments that are currently pending resolution. They do not
1208+
/// include only payments that are currently inflight, but also those who may have yet to find a
1209+
/// path or have outstanding HTLCs.
12081210
#[derive(Debug, PartialEq)]
12091211
pub enum RecentPaymentDetails {
12101212
/// When a payment is still being sent and awaiting successful delivery.
@@ -1217,16 +1219,16 @@ pub enum RecentPaymentDetails {
12171219
total_msat: u64,
12181220
},
12191221
/// When a pending payment is fulfilled, we continue tracking it until all pending HTLCs have
1220-
/// been resolved. These payments will only cease being tracked upon receiving or handling
1221-
/// [`Event::PaymentSent`].
1222+
/// been resolved. Upon receiving [`Event::PaymentSent`], we delay for a couple of seconds
1223+
/// before the payment is removed from tracking.
12221224
Fulfilled {
12231225
/// Hash of the payment that was claimed.
12241226
payment_hash: Option<PaymentHash>,
12251227
},
1226-
/// After a payment is explicitly abandoned by calling [`ChannelManager::abandon_payment`], they
1227-
/// are marked as abandoned until an [`Event::PaymentFailed`] event is generated. A payment
1228-
/// could also be marked as abandoned if pathfinding fails repeatedly and we will no longer
1229-
/// retry sending.
1228+
/// After a payment is explicitly abandoned by calling [`ChannelManager::abandon_payment`], it
1229+
/// is marked as abandoned until an [`Event::PaymentFailed`] event is generated. A payment
1230+
/// could also be marked as abandoned if pathfinding fails repeatedly or retries have been
1231+
/// exhausted.
12301232
Abandoned {
12311233
/// Hash of the payment that we have given up trying to send.
12321234
payment_hash: PaymentHash,
@@ -1800,7 +1802,7 @@ impl<M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelManager<M, T, K, F
18001802
self.list_channels_with_filter(|&(_, ref channel)| channel.is_live())
18011803
}
18021804

1803-
/// Gets a list of payments in ramdom order that are currently pending resolution.
1805+
/// Gets a list of payments in random order that are currently pending resolution.
18041806
pub fn list_pending_payments(&self) -> Vec<RecentPaymentDetails> {
18051807
self.pending_outbound_payments.lock().unwrap().iter()
18061808
.filter_map(|(_, pending_outbound_payment)| match pending_outbound_payment {

0 commit comments

Comments
 (0)