connector
This commit is contained in:
parent
d55db7af2b
commit
63a284db65
@ -258,7 +258,10 @@ class Worker:
|
|||||||
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
|
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
|
||||||
try:
|
try:
|
||||||
r = self.coins.delete(outpoint)
|
r = self.coins.delete(outpoint)
|
||||||
block["rawTx"][z]["vIn"][i]["_c_"] = r
|
if r[0] >> 42 >= start_height and r[0] < height:
|
||||||
|
block["rawTx"][z]["vIn"][i]["_a_"] = r
|
||||||
|
else:
|
||||||
|
block["rawTx"][z]["vIn"][i]["_c_"] = r
|
||||||
t += 1
|
t += 1
|
||||||
self.destroyed_coins[r[0]] = True
|
self.destroyed_coins[r[0]] = True
|
||||||
except:
|
except:
|
||||||
@ -276,14 +279,14 @@ class Worker:
|
|||||||
self.a_coins[pointer]=True
|
self.a_coins[pointer]=True
|
||||||
blocks[x]["rawTx"][y]["vOut"][i]["_s_"] = r
|
blocks[x]["rawTx"][y]["vOut"][i]["_s_"] = r
|
||||||
except: pass
|
except: pass
|
||||||
if not blocks[x]["rawTx"][y]["coinbase"]:
|
# if not blocks[x]["rawTx"][y]["coinbase"]:
|
||||||
for i in blocks[x]["rawTx"][y]["vOut"]:
|
# for i in blocks[x]["rawTx"][y]["vOut"]:
|
||||||
try:
|
# try:
|
||||||
r = blocks[x]["rawTx"][y]["vIn"][i]["_c_"]
|
# r = blocks[x]["rawTx"][y]["vIn"][i]["_c_"]
|
||||||
self.a_coins.delete(r[0])
|
# self.a_coins.delete(r[0])
|
||||||
blocks[x]["rawTx"][y]["vIn"][i]["_a_"] = True
|
# blocks[x]["rawTx"][y]["vIn"][i]["_a_"] = True
|
||||||
except:
|
# except:
|
||||||
pass
|
# pass
|
||||||
|
|
||||||
blocks[x] = pickle.dumps(blocks[x])
|
blocks[x] = pickle.dumps(blocks[x])
|
||||||
self.pipe_sent_msg(b'result', pickle.dumps(blocks))
|
self.pipe_sent_msg(b'result', pickle.dumps(blocks))
|
||||||
|
|||||||
@ -617,18 +617,25 @@ class Connector:
|
|||||||
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
|
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
|
||||||
tx["vIn"][i]["outpoint"] = outpoint
|
tx["vIn"][i]["outpoint"] = outpoint
|
||||||
try:
|
try:
|
||||||
# inp["_a_"]
|
tx["vIn"][i]["coin"] = inp["_a_"]
|
||||||
tx["vIn"][i]["coin"] = inp["_c_"]
|
|
||||||
c += 1
|
c += 1
|
||||||
self.yy += 1
|
self.aa += 1
|
||||||
self.utxo.deleted.add(outpoint)
|
|
||||||
except:
|
except:
|
||||||
r = self.utxo.get(outpoint)
|
try:
|
||||||
if r:
|
tx["vIn"][i]["coin"] = inp["_c_"]
|
||||||
tx["vIn"][i]["coin"] = r
|
|
||||||
c += 1
|
c += 1
|
||||||
else:
|
self.yy += 1
|
||||||
missed.add((outpoint, (block_height << 42) + (block_index << 21) + i, i))
|
try:
|
||||||
|
self.utxo.get(outpoint)
|
||||||
|
except:
|
||||||
|
self.utxo.deleted.add(outpoint)
|
||||||
|
except:
|
||||||
|
r = self.utxo.get(outpoint)
|
||||||
|
if r:
|
||||||
|
tx["vIn"][i]["coin"] = r
|
||||||
|
c += 1
|
||||||
|
else:
|
||||||
|
missed.add((outpoint, (block_height << 42) + (block_index << 21) + i, i))
|
||||||
|
|
||||||
if missed:
|
if missed:
|
||||||
await self.utxo.load_utxo()
|
await self.utxo.load_utxo()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user