Skip to content

Commit

Permalink
expose wasm execution method on subxt client config
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
  • Loading branch information
gregdhill committed Feb 11, 2021
1 parent 032ba02 commit d14c1fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ futures01 = { package = "futures", version = "0.1.29" }
jsonrpsee = "0.1.0"
log = "0.4.13"
sc-network = { version = "0.8.1", default-features = false }
sc-service = { version = "0.8.1", default-features = false }
sc-service = { version = "0.8.1", default-features = false, features = ["wasmtime"] }
serde_json = "1.0.61"
sp-keyring = "2.0.1"
thiserror = "1.0.23"
Expand Down
7 changes: 6 additions & 1 deletion client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ use sc_service::{
NetworkConfiguration,
TaskType,
TelemetryEndpoints,
WasmExecutionMethod,
},
ChainSpec,
Configuration,
Expand Down Expand Up @@ -216,6 +217,8 @@ pub struct SubxtClientConfig<C: ChainSpec + 'static> {
pub role: Role,
/// Enable telemetry on the given port.
pub telemetry: Option<u16>,
/// Wasm execution method
pub wasm_method: WasmExecutionMethod,
}

impl<C: ChainSpec + 'static> SubxtClientConfig<C> {
Expand Down Expand Up @@ -283,7 +286,7 @@ impl<C: ChainSpec + 'static> SubxtClientConfig<C> {
tracing_receiver: Default::default(),
tracing_targets: Default::default(),
transaction_pool: Default::default(),
wasm_method: Default::default(),
wasm_method: self.wasm_method,
base_path: Default::default(),
informant_output_format: Default::default(),
};
Expand Down Expand Up @@ -355,6 +358,7 @@ mod tests {
chain_spec,
role: Role::Light,
telemetry: None,
wasm_method: Default::default(),
};
let client = ClientBuilder::<NodeTemplateRuntime>::new()
.set_client(
Expand Down Expand Up @@ -388,6 +392,7 @@ mod tests {
chain_spec: test_node::chain_spec::development_config().unwrap(),
role: Role::Authority(AccountKeyring::Alice),
telemetry: None,
wasm_method: Default::default(),
};
let client = ClientBuilder::<NodeTemplateRuntime>::new()
.set_client(
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ mod tests {
chain_spec: test_node::chain_spec::development_config().unwrap(),
role: Role::Authority(key),
telemetry: None,
wasm_method: Default::default(),
};
let client = ClientBuilder::new()
.set_client(
Expand Down

0 comments on commit d14c1fb

Please sign in to comment.