rpc-http-threads cli arg (#8890)

* Add optional `rpc-http-threads` cli arg

* Update `http::ServerBuilder`threads
This commit is contained in:
tgmichel
2021-06-08 13:18:57 +02:00
committed by GitHub
parent 74793a83a5
commit a4bfd40a1b
8 changed files with 27 additions and 1 deletions
+8
View File
@@ -358,6 +358,13 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized {
Ok(None)
}
/// Get the RPC HTTP thread pool size (`None` for a default 4-thread pool config).
///
/// By default this is `None`.
fn rpc_http_threads(&self) -> Result<Option<usize>> {
Ok(None)
}
/// Get the RPC cors (`None` if disabled)
///
/// By default this is `Some(Vec::new())`.
@@ -526,6 +533,7 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized {
rpc_ipc: self.rpc_ipc()?,
rpc_methods: self.rpc_methods()?,
rpc_ws_max_connections: self.rpc_ws_max_connections()?,
rpc_http_threads: self.rpc_http_threads()?,
rpc_cors: self.rpc_cors(is_dev)?,
prometheus_config: self.prometheus_config(DCV::prometheus_listen_port())?,
telemetry_endpoints,