connector

This commit is contained in:
4tochka 2019-05-28 04:45:59 +04:00
parent 42b31ffbf2
commit d949e2b0f9
2 changed files with 3 additions and 2 deletions

View File

@ -72,7 +72,7 @@ class BlockLoader:
if self.last_batch_size < 8000000:
self.rpc_batch_limit += 10
elif self.last_batch_size > 50000000 and self.rpc_batch_limit > 10:
self.rpc_batch_limit = 50
self.rpc_batch_limit = 40
if self.last_batch_size > 400:
self.last_batch_size = 400
for i in self.worker_busy:
@ -186,7 +186,7 @@ class BlockLoader:
self.last_batch_size = len(msg)
for i in blocks:
self.parent.block_preload.set(i, blocks[i])
if blocks and index == len(self.worker_busy) - 1:
if blocks:
self.parent.utxo.checkpoints.append(i)

View File

@ -54,6 +54,7 @@ class UTXO():
if not self.checkpoints: return
self.save_process = True
try:
self.log.critical("create checkpoint")
i = self.cached.peek_last_item()
self.checkpoints = sorted(self.checkpoints)
checkpoint = self.checkpoints.pop(0)