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 "