mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-09 23:28:00 +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:
@@ -141,6 +141,13 @@ pub struct NetworkParams {
|
||||
verbatim_doc_comment
|
||||
)]
|
||||
pub sync: SyncMode,
|
||||
|
||||
/// Maximum number of blocks per request.
|
||||
///
|
||||
/// Try reducing this number from the default value if you have a slow network connection
|
||||
/// and observe block requests timing out.
|
||||
#[arg(long, value_name = "COUNT", default_value_t = 64)]
|
||||
pub max_blocks_per_request: u32,
|
||||
}
|
||||
|
||||
impl NetworkParams {
|
||||
@@ -230,6 +237,7 @@ impl NetworkParams {
|
||||
allow_private_ip,
|
||||
},
|
||||
max_parallel_downloads: self.max_parallel_downloads,
|
||||
max_blocks_per_request: self.max_blocks_per_request,
|
||||
enable_dht_random_walk: !self.reserved_only,
|
||||
allow_non_globals_in_dht,
|
||||
kademlia_disjoint_query_paths: self.kademlia_disjoint_query_paths,
|
||||
|
||||
Reference in New Issue
Block a user