Skip to content

Conversation

@amackillop
Copy link

PaymentClaimed events can be replayed on every Node startup. Since nodes are pinged at minimum every 30 minutes, this causes duplicate PaymentReceived events to stack up in the queue when the event queue is not being actively processed.

These stacked events can cause payouts to fail as they timeout before the queue is drained to the actual events related to a payout.

Add a check before queuing PaymentReceived to skip if an event for that payment_id already exists in the queue, preventing duplicates.

Copy link

@martinsaposnic martinsaposnic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: contains_payment_received can be private

@f3r10 this needs to be cherry picked to your branch?

@f3r10
Copy link

f3r10 commented Jan 21, 2026

nit: contains_payment_received can be private

@f3r10 this needs to be cherry picked to your branch?

the logic of the new version is pretty much the same, so yes, it would be necessary to be cherry picked on the respective branch

PaymentClaimed events can be replayed on every Node startup. Since
nodes are pinged at minimum every 30 minutes, this causes duplicate
PaymentReceived events to stack up in the queue when the event queue
is not being actively processed.

These stacked events can cause payouts to fail as they timeout before
the queue is drained to the actual events related to a payout.

Add a check before queuing PaymentReceived to skip if an event for
that payment_id already exists in the queue, preventing duplicates.
@amackillop amackillop force-pushed the austin/mdk-415/dedupe-payment-received-events branch from 2a534c4 to 57a2dbf Compare January 21, 2026 15:48
@amackillop
Copy link
Author

nit: contains_payment_received can be private

@martinsaposnic Fixed and squashed

@amackillop amackillop merged commit ada05c2 into lsp-0.6.2 Jan 21, 2026
6 of 30 checks passed
amackillop added a commit that referenced this pull request Jan 21, 2026
PaymentClaimed events can be replayed on every Node startup. Since
nodes are pinged at minimum every 30 minutes, this causes duplicate
PaymentReceived events to stack up in the queue when the event queue
is not being actively processed.

These stacked events can cause payouts to fail as they timeout before
the queue is drained to the actual events related to a payout.

Add a check before queuing PaymentReceived to skip if an event for
that payment_id already exists in the queue, preventing duplicates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants