connector

This commit is contained in:
4tochka 2019-05-16 11:14:00 +03:00
parent b0124714b7
commit ae4fc1d948

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