mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-25 12:57:58 +00:00
expose wasm execution method on subxt client config (#230)
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
This commit is contained in:
@@ -24,6 +24,9 @@ serde_json = "1.0.61"
|
||||
sp-keyring = "3.0.0"
|
||||
thiserror = "1.0.23"
|
||||
|
||||
[target.'cfg(target_arch="x86_64")'.dependencies]
|
||||
sc-service = { version = "0.9.0", default-features = false, features = ["wasmtime"] }
|
||||
|
||||
[dev-dependencies]
|
||||
async-std = { version = "1.8.0", features = ["attributes"] }
|
||||
env_logger = "0.8.2"
|
||||
|
||||
+6
-1
@@ -54,6 +54,7 @@ use sc_service::{
|
||||
NetworkConfiguration,
|
||||
TaskType,
|
||||
TelemetryEndpoints,
|
||||
WasmExecutionMethod,
|
||||
},
|
||||
ChainSpec,
|
||||
Configuration,
|
||||
@@ -217,6 +218,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> {
|
||||
@@ -287,7 +290,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(),
|
||||
state_pruning: Default::default(),
|
||||
@@ -362,6 +365,7 @@ mod tests {
|
||||
chain_spec,
|
||||
role: Role::Light,
|
||||
telemetry: None,
|
||||
wasm_method: Default::default(),
|
||||
};
|
||||
let client = ClientBuilder::<NodeTemplateRuntime>::new()
|
||||
.set_client(
|
||||
@@ -395,6 +399,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(
|
||||
|
||||
@@ -657,6 +657,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(
|
||||
|
||||
Reference in New Issue
Block a user