connector
This commit is contained in:
parent
9eb972b0ed
commit
71e6f9d41b
@ -377,7 +377,7 @@ class Connector:
|
|||||||
await self.utxo.destroy_utxo()
|
await self.utxo.destroy_utxo()
|
||||||
try: self.checkpoints.append(block["checkpoint"])
|
try: self.checkpoints.append(block["checkpoint"])
|
||||||
except: pass
|
except: pass
|
||||||
if len(self.utxo.cached) > self.utxo.size_limit:
|
if len(self.utxo.cached) > self.utxo.size_limit and not self.utxo.save_process:
|
||||||
self.loop.create_task(self.utxo.save_utxo())
|
self.loop.create_task(self.utxo.save_utxo())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,7 @@ class UTXO():
|
|||||||
i[1][2]))))
|
i[1][2]))))
|
||||||
if block_changed:
|
if block_changed:
|
||||||
self.cached.append({i[0]: i[1]})
|
self.cached.append({i[0]: i[1]})
|
||||||
self.log.critical(">" + str(len(self.cached)))
|
# self.log.critical(">" + str(len(self.cached)))
|
||||||
#
|
#
|
||||||
# block_height
|
# block_height
|
||||||
# for key in iter(self.cached):
|
# for key in iter(self.cached):
|
||||||
@ -170,12 +170,14 @@ class UTXO():
|
|||||||
continue
|
continue
|
||||||
break
|
break
|
||||||
try:
|
try:
|
||||||
|
|
||||||
self.load_utxo_future = asyncio.Future()
|
self.load_utxo_future = asyncio.Future()
|
||||||
l = set(self.missed)
|
l = set(self.missed)
|
||||||
async with self._db_pool.acquire() as conn:
|
async with self._db_pool.acquire() as conn:
|
||||||
rows = await conn.fetch("SELECT outpoint, connector_utxo.data "
|
rows = await conn.fetch("SELECT outpoint, connector_utxo.data "
|
||||||
"FROM connector_utxo "
|
"FROM connector_utxo "
|
||||||
"WHERE outpoint = ANY($1);", l)
|
"WHERE outpoint = ANY($1);", l)
|
||||||
|
self.log.critical("-"+str(len(rows)))
|
||||||
for i in l:
|
for i in l:
|
||||||
try:
|
try:
|
||||||
self.missed.remove(i)
|
self.missed.remove(i)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user