I tried to understand which peers are contacted when using findPeer(key). I expected that searching for a key would first ask the peers that are closest to the given key, with distance defined by applying XOR on them.
For example if I have an existing peer A in my list with the ID
I would have expected that searching for the key K
would definitely ask peer A first, if he knows someone who might know the peer with an ID matching the given key K. But it seems like this doesn’t happen. Am I wrong, assuming that the IDs just get XORed to determine the distance? Is there something different going on, like only a part getting XORed or a rehash or something like that?
Thanks a lot