mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 22:47:56 +00:00
Disable Kademlia random walk when --reserved-nodes is passed (#7999)
* Disable Kademlia random walk when --reserved-nodes is passed * Update client/network/src/discovery.rs Co-authored-by: Roman Borschel <romanb@users.noreply.github.com> Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
This commit is contained in:
@@ -408,10 +408,17 @@ pub struct NetworkConfiguration {
|
||||
pub transport: TransportConfig,
|
||||
/// Maximum number of peers to ask the same blocks in parallel.
|
||||
pub max_parallel_downloads: u32,
|
||||
|
||||
/// True if Kademlia random discovery should be enabled.
|
||||
///
|
||||
/// If true, the node will automatically randomly walk the DHT in order to find new peers.
|
||||
pub enable_dht_random_walk: bool,
|
||||
|
||||
/// Should we insert non-global addresses into the DHT?
|
||||
pub allow_non_globals_in_dht: bool,
|
||||
/// Require iterative Kademlia DHT queries to use disjoint paths for increased resiliency in the
|
||||
/// presence of potentially adversarial nodes.
|
||||
|
||||
/// Require iterative Kademlia DHT queries to use disjoint paths for increased resiliency in
|
||||
/// the presence of potentially adversarial nodes.
|
||||
pub kademlia_disjoint_query_paths: bool,
|
||||
|
||||
/// Size of Yamux receive window of all substreams. `None` for the default (256kiB).
|
||||
@@ -461,6 +468,7 @@ impl NetworkConfiguration {
|
||||
wasm_external_transport: None,
|
||||
},
|
||||
max_parallel_downloads: 5,
|
||||
enable_dht_random_walk: true,
|
||||
allow_non_globals_in_dht: false,
|
||||
kademlia_disjoint_query_paths: false,
|
||||
yamux_window_size: None,
|
||||
|
||||
Reference in New Issue
Block a user