Make blocks per request configurable (#13824)

* Make blocks per request configurable

* Correct type

* Update docs

* Update client/cli/src/params/network_params.rs
This commit is contained in:
Aaro Altonen
2023-04-07 11:20:17 +03:00
committed by GitHub
parent 23de70a536
commit e77099c1a6
6 changed files with 81 additions and 33 deletions
+5
View File
@@ -566,6 +566,7 @@ pub struct NetworkConfiguration {
/// List of request-response protocols that the node supports.
pub request_response_protocols: Vec<RequestResponseConfig>,
/// Configuration for the default set of nodes used for block syncing and transactions.
pub default_peers_set: SetConfig,
@@ -590,6 +591,9 @@ pub struct NetworkConfiguration {
/// Maximum number of peers to ask the same blocks in parallel.
pub max_parallel_downloads: u32,
/// Maximum number of blocks per request.
pub max_blocks_per_request: u32,
/// Initial syncing mode.
pub sync_mode: SyncMode,
@@ -653,6 +657,7 @@ impl NetworkConfiguration {
node_name: node_name.into(),
transport: TransportConfig::Normal { enable_mdns: false, allow_private_ip: true },
max_parallel_downloads: 5,
max_blocks_per_request: 64,
sync_mode: SyncMode::Full,
enable_dht_random_walk: true,
allow_non_globals_in_dht: false,