Moved blockQueue to DSKV singleton as part of communicator decoupling

This commit is contained in:
Kevin 2020-07-24 14:37:01 -05:00
parent 47013431d2
commit 6ecb62356a
6 changed files with 37 additions and 25 deletions

View file

@ -59,6 +59,9 @@ class OnionrCommunicatorDaemon:
self.isOnline = True # Assume we're connected to the internet
self.shared_state = shared_state # TooManyObjects module
# populate kv values
self.shared_state.get_by_string('DeadSimpleKV').put('blockQueue', {})
if config.get('general.offline_mode', False):
self.isOnline = False
@ -97,11 +100,7 @@ class OnionrCommunicatorDaemon:
# set true when shutdown command received
self.shutdown = False
# list of new blocks to download
# added to when new block lists are fetched from peers
self.blockQueue = {}
# list of blocks currently downloading, avoid s
# list of blocks currently downloading
self.currentDownloading = []
# timestamp when the last online node was seen