connector
This commit is contained in:
parent
5b3bc9e5f5
commit
a9b22a4e6d
@ -43,23 +43,18 @@ class UTXO():
|
||||
del self.cached[outpoint]
|
||||
|
||||
def destroy_utxo(self, block_height):
|
||||
block_height -= self.maturity
|
||||
while self.destroyed:
|
||||
r = self.destroyed.pop()
|
||||
if r[1] > block_height:
|
||||
self.destroyed.appendleft(r)
|
||||
break
|
||||
else:
|
||||
outpoint = self.destroyed.pop()
|
||||
try:
|
||||
del self.cached[outpoint]
|
||||
self.destroyed_utxo += 1
|
||||
except:
|
||||
try:
|
||||
del self.cached[r[0]]
|
||||
del self.loaded[outpoint]
|
||||
self.destroyed_utxo += 1
|
||||
except:
|
||||
try:
|
||||
del self.loaded[r[0]]
|
||||
self.destroyed_utxo += 1
|
||||
except:
|
||||
self.destroyed_utxo += 1
|
||||
pass
|
||||
self.destroyed_utxo += 1
|
||||
pass
|
||||
|
||||
return
|
||||
|
||||
@ -153,7 +148,7 @@ class UTXO():
|
||||
self._requests += 1
|
||||
try:
|
||||
i = self.cached[key]
|
||||
self.destroyed.append((key, block_height))
|
||||
self.destroyed.append(key)
|
||||
# try:
|
||||
# self.destroyed[block_height].add(key)
|
||||
# except:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user