connector

This commit is contained in:
4tochka 2019-05-08 12:04:23 +04:00
parent 13aa3e2a52
commit 60b114fbcf
2 changed files with 10 additions and 9 deletions

View File

@ -377,11 +377,11 @@ class Connector:
self.block_headers_cache.set(block["hash"], block["height"])
self.last_block_height = block["height"]
if self.utxo_data:
if not self.deep_synchronization:
self.utxo.destroy_utxo(block["height"])
elif block["height"] % 500 == 0:
self.utxo.destroy_utxo(block["height"])
# if self.utxo_data:
# if not self.deep_synchronization:
# self.utxo.destroy_utxo(block["height"])
# elif block["height"] % 500 == 0:
# self.utxo.destroy_utxo(block["height"])
self.blocks_processed_count += 1

View File

@ -133,10 +133,11 @@ class UTXO():
self._requests += 1
try:
i = self.cached[key]
try:
self.destroyed[block_height].add(key)
except:
self.destroyed[block_height] = {key}
self.destroyed[key] = block_height
# try:
# self.destroyed[block_height].add(key)
# except:
# self.destroyed[block_height] = {key}
self._hit += 1
return i
except: