diff --git a/substrate/client/executor/src/wasm_runtime.rs b/substrate/client/executor/src/wasm_runtime.rs index 8a85f9eb58eab734b231bb81eaf697a95467622a..22f0146723c84a2dc4d2d559ba68d6efe1e53160 100644 --- a/substrate/client/executor/src/wasm_runtime.rs +++ b/substrate/client/executor/src/wasm_runtime.rs @@ -321,14 +321,14 @@ where return Err(WasmError::Instantiation(format!( "--wasmtime-precompiled is not a directory: {}", wasmtime_precompiled_dir.display() - ))); + ))) } let handle_err = |e: std::io::Error| -> WasmError { return WasmError::Instantiation(format!( "Io error when loading wasmtime precompiled folder ({}): {}", wasmtime_precompiled_dir.display(), e - )); + )) }; let mut maybe_compiled_artifact = None; @@ -364,7 +364,7 @@ where return Err(WasmError::Instantiation( "wasmtime precompiled folder contain a file with invalid utf8 name" .to_owned(), - )); + )) } } @@ -424,7 +424,7 @@ pub fn precompile_and_serialize_versioned_wasm_runtime<'c>( wasmtime_precompiled_path: &Path, ) -> Result<(), WasmError> { let semantics = match wasm_method { - WasmExecutionMethod::Compiled { instantiation_strategy } => { + WasmExecutionMethod::Compiled { instantiation_strategy } => sc_executor_wasmtime::Semantics { heap_alloc_strategy, instantiation_strategy, @@ -435,8 +435,7 @@ pub fn precompile_and_serialize_versioned_wasm_runtime<'c>( wasm_bulk_memory: false, wasm_reference_types: false, wasm_simd: false, - } - }, + }, }; let code_hash = &runtime_code.hash; diff --git a/substrate/client/service/src/builder.rs b/substrate/client/service/src/builder.rs index ebaa2be16fb7fefa005047bde561aa9e6966ca6c..31ce9755503aed97cc3312f17502bca0cf18fb89 100644 --- a/substrate/client/service/src/builder.rs +++ b/substrate/client/service/src/builder.rs @@ -257,7 +257,7 @@ pub fn new_wasm_executor<H: HostFunctions>(config: &Configuration) -> WasmExecut if let Some(ref wasmtime_precompiled_path) = config.wasmtime_precompiled { wasm_builder = wasm_builder.with_wasmtime_precompiled_path(wasmtime_precompiled_path); } - + wasm_builder.build() }