From 9282eeffd90265ac5388f7070c2c51b614ac0440 Mon Sep 17 00:00:00 2001 From: 4tochka Date: Tue, 30 Apr 2019 21:07:12 +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 e0bcd7b..aa0c43d 100644 --- a/pybtc/connector.py +++ b/pybtc/connector.py @@ -414,8 +414,9 @@ class Connector: raise Exception("duplicated block") if "previousblockhash" not in block : return - self.log.critical(str(self.block_cache.get_last())) - self.log.critical(str(block["previousblockhash"])) + lb = self.block_cache.get_last() + if lb is None and not self.last_block_height: + return if self.block_cache.get_last() != block["previousblockhash"]: if self.block_cache.get(block["previousblockhash"]) is None and self.last_block_height: self.log.critical("Connector error! Node out of sync "