Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
client/network: Document manual insertion strategy
  • Loading branch information
mxinden committed Jul 27, 2020
commit 86844acca0d65effeda4ac957f3defdf3f65bdd4
3 changes: 3 additions & 0 deletions client/network/src/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ impl DiscoveryConfig {

let mut config = KademliaConfig::default();
config.set_protocol_name(proto_name);
// By default Kademlia attempts to insert all peers into its routing table once a dialing
// attempt succeeds. In order to control which peer is added, disable the auto-insertion and
// instead add peers manually.
config.set_kbucket_inserts(KademliaBucketInserts::Manual);

let store = MemoryStore::new(self.local_peer_id.clone());
Expand Down