connector

This commit is contained in:
4tochka 2019-05-01 15:53:12 +04:00
parent 9cb7495421
commit eccb0a79cd

View File

@ -293,15 +293,15 @@ class Connector:
self.deep_synchronization = False
q = time.time()
if self.deep_synchronization:
self.log.critical(str(self.last_block_height + 1))
# self.log.critical(str(self.last_block_height + 1))
h = self.block_hashes.get(self.last_block_height + 1)
self.log.critical(str(h))
# self.log.critical(str(h))
if h is None:
h = await self.rpc.getblockhash(self.last_block_height + 1)
self.loop.create_task(self.preload_block_hashes())
else:
h = await self.rpc.getblockhash(self.last_block_height + 1)
self.log.critical(str(h))
# self.log.critical(str(h))
self.blocks_download_time += time.time() - q
await self._get_block_by_hash(h)
except Exception as err: