Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
protocols/kad/behaviour: Return peers independent of record existence (…
…libp2p#1544) A node receiving a `GetRecord` request first checks whether it has the given record. If it does have the record it does not return closer nodes. A node that knows the record for the given key is likely within a neighborhood of nodes that know the record as well. In addition the node likely knows its neighboorhood well. When querying for a key with a quorum of 1 the above behavior of only returning the record but not any close peers is fine. Once one queries with a higher quorum having a node respond with the record as well as close nodes is likely going to speed up the query, given that the returned peers probably know the record as well.
- Loading branch information