mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +00:00
Make wasm runtime cache size configurable (#10177)
* Make wasm runtime cache size configurable * apply review comments * remove VersionedRuntimeValue * fix compilation * VersionedRuntime: replace clone by Arc * fmt * fix warnings * fix tests compilation * fmt
This commit is contained in:
@@ -452,6 +452,13 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized {
|
||||
Ok(Default::default())
|
||||
}
|
||||
|
||||
/// Get maximum different runtimes in cache
|
||||
///
|
||||
/// By default this is `2`.
|
||||
fn runtime_cache_size(&self) -> Result<u8> {
|
||||
Ok(2)
|
||||
}
|
||||
|
||||
/// Activate or not the automatic announcing of blocks after import
|
||||
///
|
||||
/// By default this is `false`.
|
||||
@@ -482,6 +489,7 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized {
|
||||
let is_validator = role.is_authority();
|
||||
let (keystore_remote, keystore) = self.keystore_config(&config_dir)?;
|
||||
let telemetry_endpoints = self.telemetry_endpoints(&chain_spec)?;
|
||||
let runtime_cache_size = self.runtime_cache_size()?;
|
||||
|
||||
let unsafe_pruning = self.import_params().map(|p| p.unsafe_pruning).unwrap_or(false);
|
||||
|
||||
@@ -534,6 +542,7 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized {
|
||||
role,
|
||||
base_path: Some(base_path),
|
||||
informant_output_format: Default::default(),
|
||||
runtime_cache_size,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user