From 56c1124ee4e8d0790a8e88e2a136ac48b939241a Mon Sep 17 00:00:00 2001 From: 4tochka Date: Tue, 30 Apr 2019 20:39:05 +0400 Subject: [PATCH] connector --- pybtc/connector.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 "