Description
Right now there are methods for adding and removing addresses, but no direct API to query addresses. There is get_closest_local_peers that returns PeerIds, but not corresponding addresses. There is find_closest, but it is private.
Motivation
I need to be able to implement a mechanism similar to Kademlia's iterative lookups, but outside Kademlia. get_closest_local_peers is exactly what I need there, except I also need peer addresses to in order to respond to a query.
Requirements
get_closest_local_peers to return something like KadPeer at the minimum
- Ability to query addresses more directly would probably be nice as well
- Possibly making
find_closest public as it seems to be doing the same thing as get_closest_local_peers except it also contains addresses and filters out source peer, which is exactly what I need
Open questions
Not sure what would be the desired API here yet, hence provided a few potential options
Are you planning to do it yourself in a pull request ?
Maybe
Description
Right now there are methods for adding and removing addresses, but no direct API to query addresses. There is
get_closest_local_peersthat returnsPeerIds, but not corresponding addresses. There isfind_closest, but it is private.Motivation
I need to be able to implement a mechanism similar to Kademlia's iterative lookups, but outside Kademlia.
get_closest_local_peersis exactly what I need there, except I also need peer addresses to in order to respond to a query.Requirements
get_closest_local_peersto return something likeKadPeerat the minimumfind_closestpublic as it seems to be doing the same thing asget_closest_local_peersexcept it also contains addresses and filters out source peer, which is exactly what I needOpen questions
Not sure what would be the desired API here yet, hence provided a few potential options
Are you planning to do it yourself in a pull request ?
Maybe