pathfinder
pathfinder copied to clipboard
P2P: add wrapper/abstraction for known peers
Instead of referring directly to libp2p::kad for known peers consider creating a wrapper that would hold the list of known peers. The "list" would:
- include "in-config" predefined peers (which ofc should also be in the local DHT)
- be in sync with any kad updates (in particular new peers)
Pros:
- syncing would proceed immediately provided that at least one peer was predefined via config,
- internal p2p client logic wouldn't have to periodically poll for new/random peers.
Also see: #2187