Skip to content

Commit 9504724

Browse files
committed
f grammarz and clarity
1 parent e36a198 commit 9504724

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3606,11 +3606,12 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
36063606

36073607
fn remove_stale_resolved_payments(&self) {
36083608
// If an outbound payment was completed, and no pending HTLCs remain, we should remove it
3609-
// from the map. However, if we did that immediately when the payment completes, this could
3610-
// race the user sending a duplicate payment (and relying on our idempotency guarantees on
3611-
// send_payment to avoid actually sending). Instead, we wait two timer ticks to do the
3612-
// actual removal. This should be more than sufficient to ensure and `send_payment` calls
3613-
// which were made at the same time the `PaymentSent` event was being processed complete.
3609+
// from the map. However, if we did that immediately when the last payment HTLC is claimed,
3610+
// this could race the user making a duplicate payment call (and relying on our idempotency
3611+
// guarantees on the PaymentId to avoid actually sending). Instead, we wait a few timer
3612+
// ticks to do the actual removal. This should be more than sufficient to ensure any
3613+
// `send_payment` calls that were made at the same time the `PaymentSent` event was being
3614+
// processed complete.
36143615
let mut pending_outbound_payments = self.pending_outbound_payments.lock().unwrap();
36153616
let pending_events = self.pending_events.lock().unwrap();
36163617
pending_outbound_payments.retain(|payment_id, payment| {

0 commit comments

Comments
 (0)