mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user