1
1
mirror of https://github.com/urbit/shrub.git synced 2024-12-23 19:05:48 +03:00

Merge pull request from urbit/yu/pending-eth-watcher

eth-watcher: discard future pending logs in watchdog
This commit is contained in:
Philip Monk 2022-05-09 22:35:03 -07:00 committed by GitHub
commit 3b591c627d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -367,6 +367,17 @@
=/ dog=watchdog
?: restart *watchdog
(~(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
- config.poke
number from.config.poke