Make wasmtime the default when the feature is enabled (#8855)

* Make wasmtime the default when the feature is enabled

* Update client/cli/src/arg_enums.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
Bastian Köcher
2021-05-19 10:29:32 +02:00
committed by GitHub
parent 0b30049417
commit 6a6f330412
4 changed files with 55 additions and 22 deletions
@@ -27,6 +27,12 @@ use sc_client_api::execution_extensions::ExecutionStrategies;
use structopt::StructOpt;
use std::path::PathBuf;
#[cfg(feature = "wasmtime")]
const WASM_METHOD_DEFAULT: &str = "Compiled";
#[cfg(not(feature = "wasmtime"))]
const WASM_METHOD_DEFAULT: &str = "interpreted-i-know-what-i-do";
/// Parameters for block import.
#[derive(Debug, StructOpt, Clone)]
pub struct ImportParams {
@@ -50,9 +56,9 @@ pub struct ImportParams {
#[structopt(
long = "wasm-execution",
value_name = "METHOD",
possible_values = &WasmExecutionMethod::enabled_variants(),
possible_values = &WasmExecutionMethod::variants(),
case_insensitive = true,
default_value = "Interpreted"
default_value = WASM_METHOD_DEFAULT
)]
pub wasm_method: WasmExecutionMethod,
@@ -76,7 +82,6 @@ pub struct ImportParams {
}
impl ImportParams {
/// Specify the state cache size.
pub fn state_cache_size(&self) -> usize {
self.state_cache_size