connector
This commit is contained in:
parent
2d657f7fb5
commit
c96bba3213
@ -154,21 +154,21 @@ class UTXO():
|
|||||||
try:
|
try:
|
||||||
self.load_utxo_future = asyncio.Future()
|
self.load_utxo_future = asyncio.Future()
|
||||||
l = set(self.missed)
|
l = set(self.missed)
|
||||||
rows = []
|
rows = self.db.multi_get(l)
|
||||||
[rows.append({"outpoint": k, "data": self.db.get(k)}) for k in l]
|
|
||||||
for i in l:
|
for i in l:
|
||||||
try:
|
try:
|
||||||
self.missed.remove(i)
|
self.missed.remove(i)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
for row in rows:
|
for outpoint in rows:
|
||||||
d = row["data"]
|
d = rows[outpoint]
|
||||||
pointer = c_int_to_int(d)
|
pointer = c_int_to_int(d)
|
||||||
f = c_int_len(pointer)
|
f = c_int_len(pointer)
|
||||||
amount = c_int_to_int(d[f:])
|
amount = c_int_to_int(d[f:])
|
||||||
f += c_int_len(amount)
|
f += c_int_len(amount)
|
||||||
address = d[f:]
|
address = d[f:]
|
||||||
self.loaded[row["outpoint"]] = (pointer, amount, address)
|
self.loaded[outpoint] = (pointer, amount, address)
|
||||||
self.loaded_utxo += 1
|
self.loaded_utxo += 1
|
||||||
finally:
|
finally:
|
||||||
self.load_utxo_future.set_result(True)
|
self.load_utxo_future.set_result(True)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user