disable forced bucket refresh during join
This commit is contained in:
parent
f3e848b2e2
commit
7f3ead67bf
1 changed files with 5 additions and 5 deletions
|
@ -236,10 +236,10 @@ class Node(MockKademliaHelper):
|
|||
# find the closest peers to us
|
||||
closest = yield self._iterativeFind(self.node_id, shortlist if not self.contacts else None)
|
||||
yield _ping_contacts(closest)
|
||||
# query random hashes in our bucket key ranges to fill or split them
|
||||
random_ids_in_range = self._routingTable.getRefreshList(force=True)
|
||||
while random_ids_in_range:
|
||||
yield self.iterativeFindNode(random_ids_in_range.pop())
|
||||
# # query random hashes in our bucket key ranges to fill or split them
|
||||
# random_ids_in_range = self._routingTable.getRefreshList()
|
||||
# while random_ids_in_range:
|
||||
# yield self.iterativeFindNode(random_ids_in_range.pop())
|
||||
defer.returnValue(None)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
@ -252,7 +252,7 @@ class Node(MockKademliaHelper):
|
|||
if not joined_d.called:
|
||||
joined_d.callback(True)
|
||||
elif buckets_with_contacts < 4:
|
||||
self.reactor_callLater(1, _iterative_join, joined_d, buckets_with_contacts)
|
||||
self.reactor_callLater(0, _iterative_join, joined_d, buckets_with_contacts)
|
||||
elif not joined_d.called:
|
||||
joined_d.callback(None)
|
||||
yield joined_d
|
||||
|
|
Loading…
Reference in a new issue