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:
Stanislav TkachandBastian Köcher authored and GitHub committed 2020-03-11 09:43:37 +01:00
1 parent f21680209f
commit 93ee3104e7
23 files changed
+139 -71

No files matched your search

+2
View File
@@ -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 = {
+5
View File
@@ -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,
}
}
}