connector

This commit is contained in:
4tochka 2019-05-17 14:47:06 +04:00
parent 14edc4e8d8
commit 78742525f8
2 changed files with 15 additions and 19 deletions

View File

@ -248,11 +248,7 @@ class Worker:
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
try:
r = self.coins.delete(outpoint)
h = r[0] >> 42
if h >= start_height and h < height:
block["rawTx"][z]["vIn"][i]["_a_"] = r
else:
block["rawTx"][z]["vIn"][i]["_c_"] = r
block["rawTx"][z]["vIn"][i]["_c_"] = r
t += 1
self.destroyed_coins[r[0]] = True
except:

View File

@ -621,21 +621,21 @@ class Connector:
c += 1
self.yy += 1
except:
try:
tx["vIn"][i]["coin"] = inp["_a_"]
# try:
# tx["vIn"][i]["coin"] = inp["_a_"]
# c += 1
# self.aa += 1
# 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
self.aa += 1
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))
else:
missed.add((outpoint, (block_height << 42) + (block_index << 21) + i, i))
if missed:
await self.utxo.load_utxo()