connector
This commit is contained in:
parent
e52ec9ba95
commit
a25b6d2eb0
@ -265,10 +265,11 @@ class Worker:
|
||||
o = b"".join((block["rawTx"][z]["txId"], int_to_bytes(i)))
|
||||
pointer = (x << 42) + (z << 21) + i
|
||||
try:
|
||||
address = block["rawTx"][z]["vOut"][i]["scriptPubKey"]
|
||||
except:
|
||||
address = b"".join((bytes([block["rawTx"][z]["vOut"][i]["nType"]]),
|
||||
block["rawTx"][z]["vOut"][i]["addressHash"]))
|
||||
except:
|
||||
address = block["rawTx"][z]["vOut"][i]["scriptPubKey"]
|
||||
|
||||
self.coins[o] = (pointer, block["rawTx"][z]["vOut"][i]["value"], address)
|
||||
if not block["rawTx"][z]["coinbase"]:
|
||||
for i in block["rawTx"][z]["vIn"]:
|
||||
|
||||
@ -540,9 +540,9 @@ class Connector:
|
||||
continue
|
||||
pointer = (block["height"] << 42) + (q << 21) + i
|
||||
try:
|
||||
address = b"".join((bytes([out["nType"]]), out["scriptPubKey"]))
|
||||
except:
|
||||
address = b"".join((bytes([out["nType"]]), out["addressHash"]))
|
||||
except:
|
||||
address = b"".join((bytes([out["nType"]]), out["scriptPubKey"]))
|
||||
self.utxo.set(b"".join((tx["txId"], int_to_bytes(i))), pointer, out["value"], address)
|
||||
|
||||
c = 0
|
||||
@ -745,9 +745,10 @@ class Connector:
|
||||
continue
|
||||
pointer = (block_height << 42) + (block_index << 21) + i
|
||||
try:
|
||||
address = b"".join((bytes([out["nType"]]), out["scriptPubKey"]))
|
||||
except:
|
||||
address = b"".join((bytes([out["nType"]]), out["addressHash"]))
|
||||
|
||||
except:
|
||||
address = b"".join((bytes([out["nType"]]), out["scriptPubKey"]))
|
||||
self.utxo.set(b"".join((tx["txId"], int_to_bytes(i))), pointer, out["value"], address)
|
||||
|
||||
self.tx_cache.set(tx["txId"], True)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user