@param callback: the method to call with the results, it must take 1
parameter, the list of K closest nodes
"""
+ # Mark the bucket as having been accessed
+ self.table.touch(id)
+
# Start with our node
nodes = [copy(self.node)]
@param callback: the method to call with the results, it must take 1
parameter, the list of nodes with values
"""
+ # Mark the bucket as having been accessed
+ self.table.touch(key)
+
# Start with ourself
nodes = [copy(self.node)]
timeout = 10
DHT_DEFAULTS = {'PORT': 9977,
- 'CHECKPOINT_INTERVAL': 300, 'CONCURRENT_REQS': 4,
- 'STORE_REDUNDANCY': 3, 'RETRIEVE_VALUES': -10000,
+ 'CHECKPOINT_INTERVAL': 300, 'CONCURRENT_REQS': 8,
+ 'STORE_REDUNDANCY': 6, 'RETRIEVE_VALUES': -10000,
'MAX_FAILURES': 3, 'LOCAL_OK': True,
'MIN_PING_INTERVAL': 900,'BUCKET_STALENESS': 3600,
'KRPC_TIMEOUT': 9, 'KRPC_INITIAL_DELAY': 2,
timeout = 30
num = 20
DHT_DEFAULTS = {'PORT': 9977,
- 'CHECKPOINT_INTERVAL': 300, 'CONCURRENT_REQS': 4,
- 'STORE_REDUNDANCY': 3, 'RETRIEVE_VALUES': -10000,
+ 'CHECKPOINT_INTERVAL': 300, 'CONCURRENT_REQS': 8,
+ 'STORE_REDUNDANCY': 6, 'RETRIEVE_VALUES': -10000,
'MAX_FAILURES': 3, 'LOCAL_OK': True,
'MIN_PING_INTERVAL': 900,'BUCKET_STALENESS': 3600,
'KRPC_TIMEOUT': 9, 'KRPC_INITIAL_DELAY': 2,