mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 09:47:56 +00:00
sc-executor: Increase maximum instance count (#1856)
Changes the maximum instances count for `wasmtime` to `64`. It also allows to only pass in maximum `32` for `--max-runtime-instances` as `256` was way too big. With `64` instances in total and `32` that can be configured in maximum, there should be enough space to accommodate for extra instances that are may required to be allocated adhoc. --------- Co-authored-by: Koute <koute@users.noreply.github.com>
This commit is contained in:
@@ -22,7 +22,7 @@ use std::str::FromStr;
|
||||
/// Parameters used to config runtime.
|
||||
#[derive(Debug, Clone, Args)]
|
||||
pub struct RuntimeParams {
|
||||
/// The size of the instances cache for each runtime. The values higher than 256 are illegal.
|
||||
/// The size of the instances cache for each runtime. The values higher than 32 are illegal.
|
||||
#[arg(long, default_value_t = 8, value_parser = parse_max_runtime_instances)]
|
||||
pub max_runtime_instances: usize,
|
||||
|
||||
@@ -35,8 +35,8 @@ fn parse_max_runtime_instances(s: &str) -> Result<usize, String> {
|
||||
let max_runtime_instances = usize::from_str(s)
|
||||
.map_err(|_err| format!("Illegal `--max-runtime-instances` value: {s}"))?;
|
||||
|
||||
if max_runtime_instances > 256 {
|
||||
Err(format!("Illegal `--max-runtime-instances` value: {max_runtime_instances} is more than the allowed maximum of `256` "))
|
||||
if max_runtime_instances > 32 {
|
||||
Err(format!("Illegal `--max-runtime-instances` value: {max_runtime_instances} is more than the allowed maximum of `32` "))
|
||||
} else {
|
||||
Ok(max_runtime_instances)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user