connector
This commit is contained in:
parent
a9b22a4e6d
commit
91feaee73f
@ -380,9 +380,9 @@ class Connector:
|
|||||||
self.last_block_height = block["height"]
|
self.last_block_height = block["height"]
|
||||||
if self.utxo_data:
|
if self.utxo_data:
|
||||||
if not self.deep_synchronization:
|
if not self.deep_synchronization:
|
||||||
self.utxo.destroy_utxo(block["height"])
|
self.utxo.destroy_utxo()
|
||||||
elif block["height"] % 500 == 0:
|
elif block["height"] % 500 == 0:
|
||||||
self.utxo.destroy_utxo(block["height"])
|
self.utxo.destroy_utxo()
|
||||||
|
|
||||||
self.blocks_processed_count += 1
|
self.blocks_processed_count += 1
|
||||||
|
|
||||||
|
|||||||
@ -371,7 +371,7 @@ class Connector:
|
|||||||
self.block_headers_cache.set(block["hash"], block["height"])
|
self.block_headers_cache.set(block["hash"], block["height"])
|
||||||
self.last_block_height = block["height"]
|
self.last_block_height = block["height"]
|
||||||
if self.utxo_data:
|
if self.utxo_data:
|
||||||
self.utxo.destroy_utxo(block["height"])
|
self.utxo.destroy_utxo()
|
||||||
|
|
||||||
|
|
||||||
self.blocks_processed_count += 1
|
self.blocks_processed_count += 1
|
||||||
|
|||||||
@ -34,7 +34,7 @@ class UTXO():
|
|||||||
self.outs_total = 0
|
self.outs_total = 0
|
||||||
|
|
||||||
def set(self, outpoint, pointer, amount, address):
|
def set(self, outpoint, pointer, amount, address):
|
||||||
self.cached[outpoint] = (pointer, amount, address)
|
self.cached[outpoint] = [pointer, amount, address]
|
||||||
self.outs_total += 1
|
self.outs_total += 1
|
||||||
if pointer:
|
if pointer:
|
||||||
self.last_cached_block = pointer >> 42
|
self.last_cached_block = pointer >> 42
|
||||||
@ -42,7 +42,7 @@ class UTXO():
|
|||||||
def remove(self, outpoint):
|
def remove(self, outpoint):
|
||||||
del self.cached[outpoint]
|
del self.cached[outpoint]
|
||||||
|
|
||||||
def destroy_utxo(self, block_height):
|
def destroy_utxo(self):
|
||||||
while self.destroyed:
|
while self.destroyed:
|
||||||
outpoint = self.destroyed.pop()
|
outpoint = self.destroyed.pop()
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user