Clear the touched addresses if not caught up
This commit is contained in:
parent
39af7a7463
commit
0665e1ac5c
@ -235,9 +235,10 @@ class BlockProcessor(server.db.DB):
|
|||||||
if self.caught_up_event.is_set():
|
if self.caught_up_event.is_set():
|
||||||
# Flush everything as queries are performed on the DB and
|
# Flush everything as queries are performed on the DB and
|
||||||
# not in-memory.
|
# not in-memory.
|
||||||
await asyncio.sleep(0)
|
|
||||||
self.flush(True)
|
self.flush(True)
|
||||||
elif time.time() > self.next_cache_check:
|
else:
|
||||||
|
touched.clear()
|
||||||
|
if time.time() > self.next_cache_check:
|
||||||
self.check_cache_size()
|
self.check_cache_size()
|
||||||
self.next_cache_check = time.time() + 60
|
self.next_cache_check = time.time() + 60
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user