mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +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:
@@ -226,6 +226,7 @@ fn new_full_parts<TBl, TRtApi, TExecDisp, TGen, TCSExt>(
|
||||
let executor = NativeExecutor::<TExecDisp>::new(
|
||||
config.wasm_method,
|
||||
config.default_heap_pages,
|
||||
config.max_runtime_instances,
|
||||
);
|
||||
|
||||
let chain_spec = config.expect_chain_spec();
|
||||
@@ -352,6 +353,7 @@ where TGen: RuntimeGenesis, TCSExt: Extension {
|
||||
let executor = NativeExecutor::<TExecDisp>::new(
|
||||
config.wasm_method,
|
||||
config.default_heap_pages,
|
||||
config.max_runtime_instances,
|
||||
);
|
||||
|
||||
let db_storage = {
|
||||
|
||||
@@ -123,6 +123,10 @@ pub struct Configuration<G, E = NoExtension> {
|
||||
pub tracing_targets: Option<String>,
|
||||
/// Tracing receiver
|
||||
pub tracing_receiver: sc_tracing::TracingReceiver,
|
||||
/// The size of the instances cache.
|
||||
///
|
||||
/// The default value is 8.
|
||||
pub max_runtime_instances: usize,
|
||||
}
|
||||
|
||||
/// Configuration of the client keystore.
|
||||
@@ -224,6 +228,7 @@ impl<G, E> Default for Configuration<G, E> {
|
||||
dev_key_seed: None,
|
||||
tracing_targets: Default::default(),
|
||||
tracing_receiver: Default::default(),
|
||||
max_runtime_instances: 8,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user