connector

This commit is contained in:
4tochka 2019-05-16 09:12:30 +04:00
parent b451a7c7d0
commit 5bde840da8

View File

@ -209,7 +209,7 @@ class Worker:
self.loop.set_default_executor(ThreadPoolExecutor(20))
self.out_writer = out_writer
self.in_reader = in_reader
# self.coins = MRU(100000)
self.coins = MRU(100000)
# self.destroyed_coins = MRU(100000)
signal.signal(signal.SIGTERM, self.terminate)
self.loop.create_task(self.message_loop())
@ -245,7 +245,7 @@ class Worker:
inp = block["rawTx"][z]["vIn"][i]
outpoint = b"".join((inp["txId"], int_to_bytes(inp["vOut"])))
try:
# r = self.coins.delete(outpoint)
r = self.coins.delete(outpoint)
# block["rawTx"][z]["vIn"][i]["_c_"] = r
t += 1
# self.destroyed_coins[r[0]] = True
@ -259,7 +259,7 @@ class Worker:
except:
address = b"".join((bytes([block["rawTx"][z]["vOut"][i]["nType"]]),
block["rawTx"][z]["vOut"][i]["addressHash"]))
# self.coins[o] = (pointer, block["rawTx"][z]["vOut"][i]["value"], address)
self.coins[o] = (pointer, block["rawTx"][z]["vOut"][i]["value"], address)
blocks[x] = block
if blocks:
blocks[x]["checkpoint"] = x