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
@@ -122,6 +122,10 @@ pub struct RunCmd {
#[structopt(long = "ws-max-connections", value_name = "COUNT")]
pub ws_max_connections: Option<usize>,
/// Size of the RPC HTTP server thread pool.
#[structopt(long = "rpc-http-threads", value_name = "COUNT")]
pub rpc_http_threads: Option<usize>,
/// Specify browser Origins allowed to access the HTTP & WS RPC servers.
///
/// A comma-separated list of origins (protocol://domain or special `null`
@@ -376,6 +380,10 @@ impl CliConfiguration for RunCmd {
Ok(self.ws_max_connections)
}
fn rpc_http_threads(&self) -> Result<Option<usize>> {
Ok(self.rpc_http_threads)
}
fn rpc_cors(&self, is_dev: bool) -> Result<Option<Vec<String>>> {
Ok(self
.rpc_cors