diff --git a/pybtc/connector/utxo.py b/pybtc/connector/utxo.py index 29294ff..65a0b12 100644 --- a/pybtc/connector/utxo.py +++ b/pybtc/connector/utxo.py @@ -43,7 +43,6 @@ class UTXO(): del self.cached[outpoint] def destroy_utxo(self, block_height): - return block_height -= self.maturity for key in range(self.destroyed_utxo_block + 1, block_height + 1): if key not in self.destroyed: continue @@ -134,12 +133,12 @@ class UTXO(): self._requests += 1 try: i = self.cached.get(key) - del self.cached[key] - self.destroyed_utxo += 1 - # try: - # self.destroyed[block_height].add(key) - # except: - # self.destroyed[block_height] = {key} + # del self.cached[key] + # self.destroyed_utxo += 1 + try: + self.destroyed[block_height].add(key) + except: + self.destroyed[block_height] = {key} self._hit += 1 return i except: