mirror of
https://github.com/urbit/shrub.git
synced 2024-12-23 19:05:48 +03:00
Merge pull request #5756 from urbit/yu/pending-eth-watcher
eth-watcher: discard future pending logs in watchdog
This commit is contained in:
commit
3b591c627d
@ -367,6 +367,17 @@
|
|||||||
=/ dog=watchdog
|
=/ dog=watchdog
|
||||||
?: restart *watchdog
|
?: restart *watchdog
|
||||||
(~(got by dogs.state) path.poke)
|
(~(got by dogs.state) path.poke)
|
||||||
|
=+ pending=(sort ~(tap in ~(key by pending-logs.dog)) lth)
|
||||||
|
=? pending-logs.dog
|
||||||
|
?: restart |
|
||||||
|
?~ pending |
|
||||||
|
(gte i.pending from.config.poke)
|
||||||
|
?> ?=(^ pending)
|
||||||
|
:: if there are pending logs newer than what we poke with,
|
||||||
|
:: we need to clear those too avoid processing duplicates
|
||||||
|
::
|
||||||
|
~& %dropping-unreleased-logs^[from+i.pending n+(lent pending)]
|
||||||
|
~
|
||||||
%_ dog
|
%_ dog
|
||||||
- config.poke
|
- config.poke
|
||||||
number from.config.poke
|
number from.config.poke
|
||||||
|
Loading…
Reference in New Issue
Block a user