connector
This commit is contained in:
parent
2b35103880
commit
f97338ba73
@ -597,7 +597,7 @@ class Connector:
|
|||||||
for i in tx["vIn"]:
|
for i in tx["vIn"]:
|
||||||
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
|
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
|
||||||
try:
|
try:
|
||||||
stxo.add(outpoint, tx["vIn"][i]["__coin__"])
|
stxo.add(outpoint, tx["vIn"][i]["_c_"])
|
||||||
except:
|
except:
|
||||||
inp = tx["vIn"][i]
|
inp = tx["vIn"][i]
|
||||||
r = self.utxo.get(outpoint, block_height)
|
r = self.utxo.get(outpoint, block_height)
|
||||||
@ -618,7 +618,7 @@ class Connector:
|
|||||||
if self.utxo:
|
if self.utxo:
|
||||||
for i in tx["vOut"]:
|
for i in tx["vOut"]:
|
||||||
try:
|
try:
|
||||||
tx["vOut"][i]["__spent__"]
|
tx["vOut"][i]["_s_"]
|
||||||
except:
|
except:
|
||||||
out = tx["vOut"][i]
|
out = tx["vOut"][i]
|
||||||
# if self.skip_opreturn and out["nType"] in (3, 8):
|
# if self.skip_opreturn and out["nType"] in (3, 8):
|
||||||
|
|||||||
@ -227,10 +227,12 @@ class Worker:
|
|||||||
for i in block["rawTx"][z]["vIn"]:
|
for i in block["rawTx"][z]["vIn"]:
|
||||||
inp = block["rawTx"][z]["vIn"][i]
|
inp = block["rawTx"][z]["vIn"][i]
|
||||||
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
|
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
|
||||||
r = self.coins[outpoint]
|
try:
|
||||||
if r:
|
r = self.coins[outpoint]
|
||||||
block["rawTx"][z]["vIn"][i]["_c_"] = r
|
block["rawTx"][z]["vIn"][i]["_c_"] = r
|
||||||
self.destroyed_coins[outpoint] = True
|
self.destroyed_coins[r[0]] = True
|
||||||
|
except:
|
||||||
|
pass
|
||||||
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
|
||||||
@ -244,9 +246,10 @@ class Worker:
|
|||||||
for x in blocks:
|
for x in blocks:
|
||||||
for y in blocks[x]["rawTx"]:
|
for y in blocks[x]["rawTx"]:
|
||||||
for i in blocks[x]["rawTx"][y]["vOut"]:
|
for i in blocks[x]["rawTx"][y]["vOut"]:
|
||||||
if self.destroyed_coins[pointer]:
|
try:
|
||||||
pointer = (x << 42) + (y << 21) + i
|
pointer = (x << 42) + (y << 21) + i
|
||||||
blocks[x]["rawTx"][y]["vOut"][i]["_s_"] = 1
|
blocks[x]["rawTx"][y]["vOut"][i]["_s_"] = self.destroyed_coins[pointer]
|
||||||
|
except: pass
|
||||||
blocks[x] = pickle.dumps(blocks[x])
|
blocks[x] = pickle.dumps(blocks[x])
|
||||||
# self.log.critical(str(len(blocks)))
|
# self.log.critical(str(len(blocks)))
|
||||||
self.pipe_sent_msg(b'result', pickle.dumps(blocks))
|
self.pipe_sent_msg(b'result', pickle.dumps(blocks))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user