From da8019ef1fb0c84ce596f810feb782174490fcd2 Mon Sep 17 00:00:00 2001 From: 4tochka Date: Sat, 4 May 2019 10:53:16 +0400 Subject: [PATCH] connector --- pybtc/connector.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pybtc/connector.py b/pybtc/connector.py index 8b097bd..9f065f9 100644 --- a/pybtc/connector.py +++ b/pybtc/connector.py @@ -196,7 +196,7 @@ class Connector: (self.app_block_height_on_start - self.last_block_height,)) else: - self.app_block_height_on_start = self.last_block_height + self.app_block_height_on_start = self.last_block_utxo_cached_height async def zeromq_handler(self): @@ -349,6 +349,7 @@ class Connector: async def _new_block(self, block): if self.block_headers_cache.get(block["hash"]) is not None: return + if self.deep_synchronization: block["height"] = self.last_block_height + 1 if not self.active or not self.active_block.done() or self.last_block_height >= block["height"]: @@ -636,7 +637,7 @@ class Connector: await self.utxo.load_utxo() [stxo.add(self.utxo.get_loaded(o, block_height)) for o, s in missed] - if len(stxo) != len(tx["vIn"]): + if len(stxo) != len(tx["vIn"]) and not self.cache_loading: self.log.critical("utxo get failed " + rh2s(tx["txId"])) self.log.critical(str(stxo)) raise Exception("utxo get failed ")