Commit 90d8409
Deduplicate PaymentReceived events on restart
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 ec8c62e commit 90d8409
1 file changed
+19
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
361 | 368 | | |
362 | 369 | | |
363 | 370 | | |
| |||
938 | 945 | | |
939 | 946 | | |
940 | 947 | | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
941 | 960 | | |
942 | 961 | | |
943 | 962 | | |
| |||
0 commit comments