connector

This commit is contained in:
4tochka 2019-05-02 18:42:05 +04:00
parent 2ed45dc209
commit 407485ab6f

View File

@ -628,9 +628,8 @@ class Connector:
processed_height = self.last_block_height processed_height = self.last_block_height
while height < max_height: while height < max_height:
if self.last_block_height - height < 44000: if height - self.last_block_height < self.batch_limit * 10:
try: try:
self.log.critical(str(height))
batch = list() batch = list()
h_list = list() h_list = list()
while True: while True:
@ -664,9 +663,10 @@ class Connector:
break break
except: except:
pass pass
for i in range(processed_height, self.last_block_height): if processed_height < self.last_block_height:
self.block_preload.remove(i) for i in range(processed_height, self.last_block_height):
processed_height = self.last_block_height self.block_preload.remove(i)
processed_height = self.last_block_height
if self.block_preload._store_size < 190 * 1000000: if self.block_preload._store_size < 190 * 1000000:
continue continue
self.log.critical(str((processed_height, self.last_block_height))) self.log.critical(str((processed_height, self.last_block_height)))