Skip to content

Commit bd8397c

Browse files
committed
Rename list_pending_payments to list_recent_payments
1 parent d77e2a4 commit bd8397c

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
@@ -1646,7 +1646,7 @@ impl<M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelManager<M, T, K, F
16461646
/// This can be useful for figuring out whether or not a payment made needs to be retried.
16471647
/// In general, if it is not listed here, you should consider retrying it if not
16481648
/// [`RecentPaymentDetails::Fulfilled`].
1649-
pub fn list_pending_payments(&self) -> Vec<RecentPaymentDetails> {
1649+
pub fn list_recent_payments(&self) -> Vec<RecentPaymentDetails> {
16501650
self.pending_outbound_payments.pending_outbound_payments.lock().unwrap().iter()
16511651
.filter_map(|(_, pending_outbound_payment)| match pending_outbound_payment {
16521652
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
@@ -1290,7 +1290,7 @@ fn test_trivial_inflight_htlc_tracking(){
12901290
assert_eq!(chan_1_used_liquidity, None);
12911291
assert_eq!(chan_2_used_liquidity, None);
12921292

1293-
let pending_payments = nodes[0].node.list_pending_payments();
1293+
let pending_payments = nodes[0].node.list_recent_payments();
12941294
assert_eq!(pending_payments.len(), 1);
12951295
assert_eq!(pending_payments[0], RecentPaymentDetails::Fulfilled { payment_hash: Some(payment_hash) });
12961296
}
@@ -1325,7 +1325,7 @@ fn test_trivial_inflight_htlc_tracking(){
13251325
assert_eq!(chan_1_used_liquidity, Some(501000));
13261326
assert_eq!(chan_2_used_liquidity, Some(500000));
13271327

1328-
let pending_payments = nodes[0].node.list_pending_payments();
1328+
let pending_payments = nodes[0].node.list_recent_payments();
13291329
assert_eq!(pending_payments.len(), 1);
13301330
assert_eq!(pending_payments[0], RecentPaymentDetails::Pending { payment_hash, total_msat: 500000 });
13311331
}
@@ -1360,7 +1360,7 @@ fn test_trivial_inflight_htlc_tracking(){
13601360
assert_eq!(chan_1_used_liquidity, None);
13611361
assert_eq!(chan_2_used_liquidity, None);
13621362

1363-
let pending_payments = nodes[0].node.list_pending_payments();
1363+
let pending_payments = nodes[0].node.list_recent_payments();
13641364
assert_eq!(pending_payments.len(), 0);
13651365
}
13661366
}

0 commit comments

Comments
 (0)