Skip to content

Commit e4488ba

Browse files
author
Lee Miller
committed
Move loading cryptors into objectProcessor init.
1 parent 7ca1858 commit e4488ba

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/bitmessagemain.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import defaults
3333
# Network subsystem
3434
import network
35-
import shared
3635
import shutdown
3736
import state
3837

@@ -181,9 +180,6 @@ def start(self):
181180
Inventory() # init
182181

183182
if state.enableObjProc: # Not needed if objproc is disabled
184-
shared.reloadMyAddressHashes()
185-
shared.reloadBroadcastSendersForWhichImWatching()
186-
187183
# Start the address generation thread
188184
addressGeneratorThread = addressGenerator()
189185
# close the main program even if there are threads left

src/class_objectProcessor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ class objectProcessor(threading.Thread):
4444
def __init__(self):
4545
threading.Thread.__init__(self, name="objectProcessor")
4646
random.seed()
47+
sql_ready.wait()
48+
shared.reloadMyAddressHashes()
49+
shared.reloadBroadcastSendersForWhichImWatching()
4750
# It may be the case that the last time Bitmessage was running,
4851
# the user closed it before it finished processing everything in the
4952
# objectProcessorQueue. Assuming that Bitmessage wasn't closed
5053
# forcefully, it should have saved the data in the queue into the
5154
# objectprocessorqueue table. Let's pull it out.
52-
sql_ready.wait()
5355
queryreturn = sqlQuery(
5456
'SELECT objecttype, data FROM objectprocessorqueue')
5557
for objectType, data in queryreturn:

0 commit comments

Comments
 (0)