libp2p / js-libp2p

The JavaScript Implementation of libp2p networking stack.
https://libp2p.io
Other
2.27k stars 436 forks source link

fix: return self in FIND_NODE for self #2512

Closed achingbrain closed 2 months ago

achingbrain commented 2 months ago

Partial revert of #2499

If a node is queried for it's own peer id, return it's own peer info.

This is necessary because since https://github.com/libp2p/go-libp2p-kad-dht/pull/820 go-libp2p-kad-dht won't add a peer to it's routing tables that doesn't have any DHT peers that are KAD-futher from it's own ID already.

Change checklist