connector

This commit is contained in:
4tochka 2019-05-16 16:38:20 +03:00
parent 7668bf3e83
commit bb6464c5d5

View File

@ -241,16 +241,17 @@ class Worker:
if y["result"] is not None: if y["result"] is not None:
block = decode_block_tx(y["result"]) block = decode_block_tx(y["result"])
for z in block["rawTx"]: for z in block["rawTx"]:
for i in block["rawTx"][z]["vIn"]: if not block["rawTx"][z]["coinbase"]:
inp = block["rawTx"][z]["vIn"][i] for i in block["rawTx"][z]["vIn"]:
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"]))) inp = block["rawTx"][z]["vIn"][i]
try: outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
r = self.coins.delete(outpoint) try:
block["rawTx"][z]["vIn"][i]["_c_"] = r r = self.coins.delete(outpoint)
t += 1 block["rawTx"][z]["vIn"][i]["_c_"] = r
self.destroyed_coins[r[0]] = True t += 1
except: self.destroyed_coins[r[0]] = True
self.log.critical(str(traceback.format_exc())) except:
self.log.critical(str(traceback.format_exc()))
for i in block["rawTx"][z]["vOut"]: for i in block["rawTx"][z]["vOut"]:
o = b"".join((block["rawTx"][z]["txId"], int_to_bytes(i))) o = b"".join((block["rawTx"][z]["txId"], int_to_bytes(i)))
pointer = (x << 42) + (z << 21) + i pointer = (x << 42) + (z << 21) + i