Increase parallel downloads to 5 (#4045)

* Increase parallel downloads to 5

* CLI param
This commit is contained in:
Arkadiy Paronyan
2019-11-08 11:24:46 +01:00
committed by Gavin Wood
parent 2125b87cae
commit dfded93411
9 changed files with 50 additions and 16 deletions
+2
View File
@@ -628,6 +628,8 @@ fn fill_network_configuration(
wasm_external_transport: None,
};
config.max_parallel_downloads = cli.max_parallel_downloads;
Ok(())
}
+9 -2
View File
@@ -146,11 +146,11 @@ pub struct NetworkConfigurationParams {
pub port: Option<u16>,
/// Specify the number of outgoing connections we're trying to maintain.
#[structopt(long = "out-peers", value_name = "OUT_PEERS", default_value = "25")]
#[structopt(long = "out-peers", value_name = "COUNT", default_value = "25")]
pub out_peers: u32,
/// Specify the maximum number of incoming connections we're accepting.
#[structopt(long = "in-peers", value_name = "IN_PEERS", default_value = "25")]
#[structopt(long = "in-peers", value_name = "COUNT", default_value = "25")]
pub in_peers: u32,
/// Disable mDNS discovery.
@@ -160,6 +160,13 @@ pub struct NetworkConfigurationParams {
#[structopt(long = "no-mdns")]
pub no_mdns: bool,
/// Maximum number of peers to ask the same blocks in parallel.
///
/// This allows downlading announced blocks from multiple peers. Decrease to save
/// traffic and risk increased latency.
#[structopt(long = "max-parallel-downloads", value_name = "COUNT", default_value = "5")]
pub max_parallel_downloads: u32,
#[allow(missing_docs)]
#[structopt(flatten)]
pub node_key_params: NodeKeyParams