opening dbs can raise too

This commit is contained in:
Victor Shyba 2019-11-25 14:50:04 -03:00 committed by Lex Berezhny
parent e77acde005
commit 7a044f9f78

View file

@ -645,12 +645,15 @@ class BlockProcessor:
could be lost.
"""
self._caught_up_event = caught_up_event
await self._first_open_dbs()
try:
await self._first_open_dbs()
await asyncio.wait([
self.prefetcher.main_loop(self.height),
self._process_prefetched_blocks()
])
except:
self.logger.exception("Block processing failed!")
raise
finally:
# Shut down block processing
self.logger.info('flushing to DB for a clean shutdown...')