connector

This commit is contained in:
4tochka 2019-05-09 12:51:08 +04:00
parent 5f5b5fb228
commit ac06d6474d
2 changed files with 3 additions and 3 deletions

View File

@ -595,11 +595,11 @@ class Connector:
if self.utxo:
stxo, missed = set(), set()
for i in tx["vIn"]:
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
try:
stxo.add(tx["vIn"][i]["__coin__"])
stxo.add(outpoint, tx["vIn"][i]["__coin__"])
except:
inp = tx["vIn"][i]
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
r = self.utxo.get(outpoint, block_height)
stxo.add(r) if r else missed.add((outpoint, (block_height << 42) + (block_index << 21) + i))

View File

@ -229,7 +229,7 @@ class Worker:
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
try:
r = self.coins[outpoint]
block["rawTx"][z]["vIn"][i]["__coin__"] = (outpoint, r[0], r[1], r[2])
block["rawTx"][z]["vIn"][i]["__coin__"] = r
self.destroyed_coins[r[0]] = True
except:
pass