connector

This commit is contained in:
4tochka 2019-04-30 21:07:12 +04:00
parent 661abc69bd
commit 9282eeffd9

View File

@ -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 "