connector
This commit is contained in:
parent
202b10a8d7
commit
036f736c63
@ -597,7 +597,7 @@ class Connector:
|
|||||||
stxo.add((outpoint, inp["_c_"][0], inp["_c_"][1], inp["_c_"][2]))
|
stxo.add((outpoint, inp["_c_"][0], inp["_c_"][1], inp["_c_"][2]))
|
||||||
self.yy += 1
|
self.yy += 1
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
r = self.utxo.get(outpoint, block_height)
|
r = self.utxo.get(outpoint)
|
||||||
stxo.add(r) if r else missed.add((outpoint, (block_height << 42) + (block_index << 21) + i))
|
stxo.add(r) if r else missed.add((outpoint, (block_height << 42) + (block_index << 21) + i))
|
||||||
|
|
||||||
if missed:
|
if missed:
|
||||||
@ -721,7 +721,7 @@ class Connector:
|
|||||||
for i in tx["vIn"]:
|
for i in tx["vIn"]:
|
||||||
inp = tx["vIn"][i]
|
inp = tx["vIn"][i]
|
||||||
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
|
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
|
||||||
r = self.utxo.get(outpoint, block_height)
|
r = self.utxo.get(outpoint)
|
||||||
stxo.add(r) if r else missed.add((outpoint, (block_height << 42) + (block_index << 21) + i))
|
stxo.add(r) if r else missed.add((outpoint, (block_height << 42) + (block_index << 21) + i))
|
||||||
|
|
||||||
if missed:
|
if missed:
|
||||||
|
|||||||
@ -144,7 +144,7 @@ class UTXO():
|
|||||||
finally:
|
finally:
|
||||||
self.save_process = False
|
self.save_process = False
|
||||||
|
|
||||||
def get(self, key, block_height):
|
def get(self, key):
|
||||||
self._requests += 1
|
self._requests += 1
|
||||||
try:
|
try:
|
||||||
i = pickle.loads(self.cached[key])
|
i = pickle.loads(self.cached[key])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user