mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 07:21:17 +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:
@@ -283,7 +283,7 @@ impl<Block: BlockT, D, Backend, G: GenesisInit>
|
||||
Backend: sc_client_api::backend::Backend<Block> + 'static,
|
||||
{
|
||||
let executor = executor.into().unwrap_or_else(|| {
|
||||
NativeElseWasmExecutor::new(WasmExecutionMethod::Interpreted, None, 8)
|
||||
NativeElseWasmExecutor::new(WasmExecutionMethod::Interpreted, None, 8, 2)
|
||||
});
|
||||
let executor = LocalCallExecutor::new(
|
||||
self.backend.clone(),
|
||||
|
||||
@@ -287,5 +287,10 @@ pub fn new() -> Client<Backend> {
|
||||
|
||||
/// Create a new native executor.
|
||||
pub fn new_native_executor() -> sc_executor::NativeElseWasmExecutor<LocalExecutorDispatch> {
|
||||
sc_executor::NativeElseWasmExecutor::new(sc_executor::WasmExecutionMethod::Interpreted, None, 8)
|
||||
sc_executor::NativeElseWasmExecutor::new(
|
||||
sc_executor::WasmExecutionMethod::Interpreted,
|
||||
None,
|
||||
8,
|
||||
2,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ mod tests {
|
||||
}
|
||||
|
||||
fn executor() -> NativeElseWasmExecutor<NativeDispatch> {
|
||||
NativeElseWasmExecutor::new(WasmExecutionMethod::Interpreted, None, 8)
|
||||
NativeElseWasmExecutor::new(WasmExecutionMethod::Interpreted, None, 8, 2)
|
||||
}
|
||||
|
||||
fn new_test_ext() -> TestExternalities {
|
||||
|
||||
@@ -111,6 +111,7 @@ where
|
||||
config.wasm_method,
|
||||
config.default_heap_pages,
|
||||
config.max_runtime_instances,
|
||||
config.runtime_cache_size,
|
||||
);
|
||||
|
||||
let (client, backend, keystore, mut task_manager) =
|
||||
|
||||
@@ -113,5 +113,6 @@ pub fn default_config(tokio_handle: Handle, mut chain_spec: Box<dyn ChainSpec>)
|
||||
keep_blocks: KeepBlocks::All,
|
||||
state_pruning: Default::default(),
|
||||
transaction_storage: TransactionStorageMode::BlockBody,
|
||||
runtime_cache_size: 2,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user