diff --git a/pybtc/connector.py b/pybtc/connector.py index 28f17b0..fcb4587 100644 --- a/pybtc/connector.py +++ b/pybtc/connector.py @@ -412,7 +412,8 @@ class Connector: if self.block_cache.get(block["hash"]) is not None: self.log.error("duplicated block %s" % block["hash"]) raise Exception("duplicated block") - + if "previousblockhash" not in block: + 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 "