mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
Use CLI to configure max instances cache (#5177)
* Use CLI to configure max instances cache * Fix tests * Move default value into CLI * Use SmallVec * Apply review comments * Get rid of `SmallVec` Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -265,7 +265,13 @@ pub struct RunCmd {
|
||||
parse(from_os_str),
|
||||
conflicts_with_all = &[ "password-interactive", "password" ]
|
||||
)]
|
||||
pub password_filename: Option<PathBuf>
|
||||
pub password_filename: Option<PathBuf>,
|
||||
|
||||
/// The size of the instances cache for each runtime.
|
||||
///
|
||||
/// The default value is 8 and the values higher than 256 are ignored.
|
||||
#[structopt(long = "max-runtime-instances", default_value = "8")]
|
||||
pub max_runtime_instances: usize,
|
||||
}
|
||||
|
||||
impl RunCmd {
|
||||
@@ -435,6 +441,8 @@ impl RunCmd {
|
||||
// Imply forced authoring on --dev
|
||||
config.force_authoring = self.shared_params.dev || self.force_authoring;
|
||||
|
||||
config.max_runtime_instances = self.max_runtime_instances.min(256);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user