From 7a044f9f78f059feb52c0a734faea02dab2f7be6 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Mon, 25 Nov 2019 14:50:04 -0300 Subject: [PATCH] opening dbs can raise too --- torba/torba/server/block_processor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/torba/torba/server/block_processor.py b/torba/torba/server/block_processor.py index 4e94d057f..2fe80b169 100644 --- a/torba/torba/server/block_processor.py +++ b/torba/torba/server/block_processor.py @@ -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...')