Fix a bug where content of unchecked_node_pool was overwriting node_pool

This commit is contained in:
TheKysek 2016-10-17 19:11:17 +02:00
parent 29ebdc44c9
commit 027701882a

View File

@ -105,7 +105,7 @@ class Manager(threading.Thread):
if len(shared.node_pool) > 10000:
shared.node_pool = set(random.sample(shared.node_pool, 10000))
if len(shared.unchecked_node_pool) > 1000:
shared.node_pool = set(random.sample(shared.unchecked_node_pool, 1000))
shared.unchecked_node_pool = set(random.sample(shared.unchecked_node_pool, 1000))
try:
with open(shared.data_directory + 'nodes.pickle', mode='bw') as file:
pickle.dump(shared.node_pool, file, protocol=4)