connector

This commit is contained in:
4tochka 2019-05-27 23:37:38 +04:00
parent 2d657f7fb5
commit c96bba3213

View File

@ -154,21 +154,21 @@ class UTXO():
try:
self.load_utxo_future = asyncio.Future()
l = set(self.missed)
rows = []
[rows.append({"outpoint": k, "data": self.db.get(k)}) for k in l]
rows = self.db.multi_get(l)
for i in l:
try:
self.missed.remove(i)
except:
pass
for row in rows:
d = row["data"]
for outpoint in rows:
d = rows[outpoint]
pointer = c_int_to_int(d)
f = c_int_len(pointer)
amount = c_int_to_int(d[f:])
f += c_int_len(amount)
address = d[f:]
self.loaded[row["outpoint"]] = (pointer, amount, address)
self.loaded[outpoint] = (pointer, amount, address)
self.loaded_utxo += 1
finally:
self.load_utxo_future.set_result(True)