mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 20:47:56 +00:00
client/network: Allow configuring Kademlia's disjoint query paths (#7356)
The Rust libp2p-kad implementation can require iterative queries to use disjoint paths for increased resiliency in the presence of potentially adversarial nodes. Allow Substrate users to enable this feature via the `--kademlia-disjoint-query-paths` flag.
This commit is contained in:
@@ -292,6 +292,7 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkWorker<B, H> {
|
||||
config.discovery_limit(u64::from(params.network_config.out_peers) + 15);
|
||||
config.add_protocol(params.protocol_id.clone());
|
||||
config.allow_non_globals_in_dht(params.network_config.allow_non_globals_in_dht);
|
||||
config.use_kademlia_disjoint_query_paths(params.network_config.kademlia_disjoint_query_paths);
|
||||
|
||||
match params.network_config.transport {
|
||||
TransportConfig::MemoryOnly => {
|
||||
|
||||
Reference in New Issue
Block a user