mirror of https://github.com/nucypher/nucypher.git
A threadpool for alice to use for policy publication network requests.
parent
ea78f4f81f
commit
b22e6cc7b6
|
@ -24,6 +24,11 @@ from random import shuffle
|
|||
|
||||
import maya
|
||||
import time
|
||||
|
||||
from twisted.python.threadpool import ThreadPool
|
||||
|
||||
from bytestring_splitter import BytestringKwargifier, BytestringSplittingError
|
||||
from bytestring_splitter import BytestringSplitter, VariableLengthBytestring
|
||||
from bytestring_splitter import BytestringKwargifier, BytestringSplitter, BytestringSplittingError, \
|
||||
VariableLengthBytestring
|
||||
from constant_sorrow import constants
|
||||
|
@ -123,6 +128,9 @@ class Alice(Character, BlockchainPolicyAuthor):
|
|||
if is_me:
|
||||
self.m = m
|
||||
self.n = n
|
||||
|
||||
self.publication_threadpool = ThreadPool(maxthreads=120, minthreads=20, name="Alice Policy Publication") # In the future, this value is perhaps best set to something like 3-4 times the optimal "high n", whatever we determine that to be.
|
||||
self.publication_threadpool.start()
|
||||
else:
|
||||
self.m = STRANGER_ALICE
|
||||
self.n = STRANGER_ALICE
|
||||
|
|
Loading…
Reference in New Issue