Skip to content

Commit da90a0f

Browse files
committed
f Also trigger processing when retries are needed
1 parent c66d25b commit da90a0f

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6322,8 +6322,9 @@ where
63226322
pub fn is_pending_htlc_processing(&self) -> bool {
63236323
let has_forward_htlcs = !self.forward_htlcs.lock().unwrap().is_empty();
63246324
let has_decode_update_add_htlcs = !self.decode_update_add_htlcs.lock().unwrap().is_empty();
6325-
let has_outbound_needing_abandon = self.pending_outbound_payments.needs_abandon();
6326-
has_forward_htlcs || has_decode_update_add_htlcs || has_outbound_needing_abandon
6325+
let has_outbound_needing_abandon_or_retry =
6326+
self.pending_outbound_payments.needs_abandon_or_retry();
6327+
has_forward_htlcs || has_decode_update_add_htlcs || has_outbound_needing_abandon_or_retry
63276328
}
63286329

63296330
/// Processes HTLCs which are pending waiting on random forward delay.

lightning/src/ln/outbound_payment.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,13 +1318,14 @@ impl OutboundPayments {
13181318
});
13191319
}
13201320

1321-
pub(super) fn needs_abandon(&self) -> bool {
1321+
pub(super) fn needs_abandon_or_retry(&self) -> bool {
13221322
let outbounds = self.pending_outbound_payments.lock().unwrap();
13231323
outbounds.iter().any(|(_, pmt)| {
1324-
!pmt.is_auto_retryable_now()
1325-
&& pmt.remaining_parts() == 0
1326-
&& !pmt.is_fulfilled()
1327-
&& !pmt.is_awaiting_invoice()
1324+
pmt.is_auto_retryable_now()
1325+
|| !pmt.is_auto_retryable_now()
1326+
&& pmt.remaining_parts() == 0
1327+
&& !pmt.is_fulfilled()
1328+
&& !pmt.is_awaiting_invoice()
13281329
})
13291330
}
13301331

0 commit comments

Comments
 (0)