Skip to content

Commit dc6e4fa

Browse files
committed
Rename list_pending_payments to list_recent_payments
1 parent 285b363 commit dc6e4fa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ where
17041704
/// This can be useful for figuring out whether or not a payment made needs to be retried.
17051705
/// In general, if it is not listed here, you should consider retrying it if not
17061706
/// [`RecentPaymentDetails::Fulfilled`].
1707-
pub fn list_pending_payments(&self) -> Vec<RecentPaymentDetails> {
1707+
pub fn list_recent_payments(&self) -> Vec<RecentPaymentDetails> {
17081708
self.pending_outbound_payments.pending_outbound_payments.lock().unwrap().iter()
17091709
.filter_map(|(_, pending_outbound_payment)| match pending_outbound_payment {
17101710
PendingOutboundPayment::Retryable { payment_hash, total_msat, .. } => {

lightning/src/ln/payment_tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ fn test_trivial_inflight_htlc_tracking(){
12961296
assert_eq!(chan_1_used_liquidity, None);
12971297
assert_eq!(chan_2_used_liquidity, None);
12981298

1299-
let pending_payments = nodes[0].node.list_pending_payments();
1299+
let pending_payments = nodes[0].node.list_recent_payments();
13001300
assert_eq!(pending_payments.len(), 1);
13011301
assert_eq!(pending_payments[0], RecentPaymentDetails::Fulfilled { payment_hash: Some(payment_hash) });
13021302
}
@@ -1333,7 +1333,7 @@ fn test_trivial_inflight_htlc_tracking(){
13331333
assert_eq!(chan_1_used_liquidity, Some(501000));
13341334
assert_eq!(chan_2_used_liquidity, Some(500000));
13351335

1336-
let pending_payments = nodes[0].node.list_pending_payments();
1336+
let pending_payments = nodes[0].node.list_recent_payments();
13371337
assert_eq!(pending_payments.len(), 1);
13381338
assert_eq!(pending_payments[0], RecentPaymentDetails::Pending { payment_hash, total_msat: 500000 });
13391339
}
@@ -1370,7 +1370,7 @@ fn test_trivial_inflight_htlc_tracking(){
13701370
assert_eq!(chan_1_used_liquidity, None);
13711371
assert_eq!(chan_2_used_liquidity, None);
13721372

1373-
let pending_payments = nodes[0].node.list_pending_payments();
1373+
let pending_payments = nodes[0].node.list_recent_payments();
13741374
assert_eq!(pending_payments.len(), 0);
13751375
}
13761376
}

0 commit comments

Comments
 (0)