Commit b51e5de
committed
Deduplicate PaymentReceived events on restart (#5)
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.1 parent 099dd42 commit b51e5de
1 file changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
420 | 427 | | |
421 | 428 | | |
422 | 429 | | |
| |||
1010 | 1017 | | |
1011 | 1018 | | |
1012 | 1019 | | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
1013 | 1032 | | |
1014 | 1033 | | |
1015 | 1034 | | |
| |||
0 commit comments