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. could be lost.
""" """
self._caught_up_event = caught_up_event self._caught_up_event = caught_up_event
await self._first_open_dbs()
try: try:
await self._first_open_dbs()
await asyncio.wait([ await asyncio.wait([
self.prefetcher.main_loop(self.height), self.prefetcher.main_loop(self.height),
self._process_prefetched_blocks() self._process_prefetched_blocks()
]) ])
except:
self.logger.exception("Block processing failed!")
raise
finally: finally:
# Shut down block processing # Shut down block processing
self.logger.info('flushing to DB for a clean shutdown...') self.logger.info('flushing to DB for a clean shutdown...')