@@ -1204,7 +1204,9 @@ impl ChannelDetails {
1204
1204
}
1205
1205
}
1206
1206
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.
1208
1210
#[ derive( Debug , PartialEq ) ]
1209
1211
pub enum RecentPaymentDetails {
1210
1212
/// When a payment is still being sent and awaiting successful delivery.
@@ -1217,16 +1219,16 @@ pub enum RecentPaymentDetails {
1217
1219
total_msat : u64 ,
1218
1220
} ,
1219
1221
/// 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 .
1222
1224
Fulfilled {
1223
1225
/// Hash of the payment that was claimed.
1224
1226
payment_hash : Option < PaymentHash > ,
1225
1227
} ,
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 .
1230
1232
Abandoned {
1231
1233
/// Hash of the payment that we have given up trying to send.
1232
1234
payment_hash : PaymentHash ,
@@ -1800,7 +1802,7 @@ impl<M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelManager<M, T, K, F
1800
1802
self . list_channels_with_filter ( |& ( _, ref channel) | channel. is_live ( ) )
1801
1803
}
1802
1804
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.
1804
1806
pub fn list_pending_payments ( & self ) -> Vec < RecentPaymentDetails > {
1805
1807
self . pending_outbound_payments . lock ( ) . unwrap ( ) . iter ( )
1806
1808
. filter_map ( |( _, pending_outbound_payment) | match pending_outbound_payment {
0 commit comments