From 661abc69bd9415b89f1be9c060ae2b1cf7c36b3d Mon Sep 17 00:00:00 2001 From: 4tochka Date: Tue, 30 Apr 2019 20:43:48 +0400 Subject: [PATCH] connector --- pybtc/connector.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pybtc/connector.py b/pybtc/connector.py index fcb4587..e0bcd7b 100644 --- a/pybtc/connector.py +++ b/pybtc/connector.py @@ -412,8 +412,10 @@ 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: + if "previousblockhash" not in block : return + self.log.critical(str(self.block_cache.get_last())) + self.log.critical(str(block["previousblockhash"])) 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 "