From d65dc0aec3be47c885cb4021889a13059eda9734 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Wed, 23 May 2018 16:55:36 -0400 Subject: [PATCH] disable loading DictDataStore in Node.__init__ -to be re-done when the datastore uses sqlite --- lbrynet/dht/node.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/lbrynet/dht/node.py b/lbrynet/dht/node.py index 804ba85ef..c7393366b 100644 --- a/lbrynet/dht/node.py +++ b/lbrynet/dht/node.py @@ -122,20 +122,9 @@ class Node(object): # Initialize the data storage mechanism used by this node self.token_secret = self._generateID() self.old_token_secret = None - if dataStore is None: - self._dataStore = datastore.DictDataStore() - else: - self._dataStore = dataStore - # Try to restore the node's state... - if 'nodeState' in self._dataStore: - state = self._dataStore['nodeState'] - self.node_id = state['id'] - for contactTriple in state['closestNodes']: - contact = Contact( - contactTriple[0], contactTriple[1], contactTriple[2], self._protocol) - self._routingTable.addContact(contact) self.externalIP = externalIP self.peerPort = peerPort + self._dataStore = dataStore or datastore.DictDataStore() self.peer_manager = peer_manager or PeerManager() self.peer_finder = peer_finder or DHTPeerFinder(self, self.peer_manager)