From dbfe9096c2c24b9033aee428bc4e422d91dc25b0 Mon Sep 17 00:00:00 2001 From: "John L. Jegutanis" Date: Sun, 5 Aug 2018 11:49:50 +0200 Subject: [PATCH] Fix reorg crash due a missing await (#555) --- electrumx/server/block_processor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrumx/server/block_processor.py b/electrumx/server/block_processor.py index fa70a6c..1645bb7 100644 --- a/electrumx/server/block_processor.py +++ b/electrumx/server/block_processor.py @@ -263,7 +263,7 @@ class BlockProcessor(electrumx.server.db.DB): The hashes are returned in order of increasing height. Start is the height of the first hash, last of the last. ''' - start, count = self.calc_reorg_range(count) + start, count = await self.calc_reorg_range(count) last = start + count - 1 s = '' if count == 1 else 's' self.logger.info(f'chain was reorganised replacing {count:,d} ' @@ -835,7 +835,7 @@ class BlockProcessor(electrumx.server.db.DB): class DecredBlockProcessor(BlockProcessor): async def calc_reorg_range(self, count): - start, count = super().calc_reorg_range(count) + start, count = await super().calc_reorg_range(count) if start > 0: # A reorg in Decred can invalidate the previous block start -= 1