Temporary hack to fix initial sync slowdown

This commit is contained in:
Neil Booth 2016-12-08 22:47:29 +09:00
parent cbb1e504cc
commit 7399452294

View File

@ -223,7 +223,10 @@ class BlockProcessor(server.db.DB):
touched = set()
loop = asyncio.get_event_loop()
try:
await loop.run_in_executor(None, do_it)
if self.caught_up:
await loop.run_in_executor(None, do_it)
else:
do_it()
except ChainReorg:
await self.handle_chain_reorg(touched)