|
@ -382,8 +382,9 @@ class BlockProcessor(server.db.DB): |
|
|
while True: |
|
|
while True: |
|
|
await self._wait_for_update() |
|
|
await self._wait_for_update() |
|
|
await asyncio.sleep(0) # Yield |
|
|
await asyncio.sleep(0) # Yield |
|
|
finally: |
|
|
except asyncio.CancelledError: |
|
|
self.flush(True) |
|
|
self.flush(True) |
|
|
|
|
|
raise |
|
|
|
|
|
|
|
|
async def _wait_for_update(self): |
|
|
async def _wait_for_update(self): |
|
|
'''Wait for the prefetcher to deliver blocks or a mempool update. |
|
|
'''Wait for the prefetcher to deliver blocks or a mempool update. |
|
|