fix routing_table_get

This commit is contained in:
Jack Robison 2018-06-06 17:18:48 -04:00
parent 4fbaaac3f3
commit adca5f5993
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -3150,18 +3150,13 @@ class Daemon(AuthJSONRPCServer):
"""
result = {}
data_store = deepcopy(self.session.dht_node._dataStore._dict)
data_store = self.session.dht_node._dataStore._dict
datastore_len = len(data_store)
hosts = {}
if datastore_len:
for k, v in data_store.iteritems():
for value, lastPublished, originallyPublished, originalPublisherID in v:
try:
contact = self.session.dht_node._routingTable.getContact(
originalPublisherID)
except (ValueError, IndexError):
continue
for contact, value, lastPublished, originallyPublished, originalPublisherID in v:
if contact in hosts:
blobs = hosts[contact]
else: