connector
This commit is contained in:
parent
e5001a9a7b
commit
6de71cf884
@ -377,10 +377,16 @@ class Connector:
|
|||||||
if len(self.utxo.cached) > self.utxo.size_limit and \
|
if len(self.utxo.cached) > self.utxo.size_limit and \
|
||||||
not self.utxo.save_process and \
|
not self.utxo.save_process and \
|
||||||
self.utxo.checkpoints:
|
self.utxo.checkpoints:
|
||||||
self.utxo.deleted_last_block = block["height"]
|
n = list()
|
||||||
self.utxo.pending_deleted = self.utxo.pending_deleted.union(self.utxo.deleted)
|
for i in self.utxo.checkpoints:
|
||||||
self.utxo.deleted = set()
|
if i >= block["height"]:
|
||||||
self.loop.create_task(self.utxo.save_utxo())
|
n.append(i)
|
||||||
|
self.utxo.checkpoints = n
|
||||||
|
if n:
|
||||||
|
self.utxo.deleted_last_block = block["height"]
|
||||||
|
self.utxo.pending_deleted = self.utxo.pending_deleted.union(self.utxo.deleted)
|
||||||
|
self.utxo.deleted = set()
|
||||||
|
self.loop.create_task(self.utxo.save_utxo())
|
||||||
|
|
||||||
|
|
||||||
self.blocks_processed_count += 1
|
self.blocks_processed_count += 1
|
||||||
|
|||||||
@ -51,7 +51,8 @@ class UTXO():
|
|||||||
self.save_process = True
|
self.save_process = True
|
||||||
try:
|
try:
|
||||||
# self.log.critical("cached " + str(len(self.cached)) )
|
# self.log.critical("cached " + str(len(self.cached)) )
|
||||||
# self.checkpoints = sorted(self.checkpoints)
|
i = self.cached.peek_last_item()
|
||||||
|
self.checkpoints = sorted(self.checkpoints)
|
||||||
checkpoint = self.checkpoints.pop(0)
|
checkpoint = self.checkpoints.pop(0)
|
||||||
lb = 0
|
lb = 0
|
||||||
block_changed = False
|
block_changed = False
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user