mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 16:21:06 +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"
|
sp-keyring = "3.0.0"
|
||||||
thiserror = "1.0.23"
|
thiserror = "1.0.23"
|
||||||
|
|
||||||
|
[target.'cfg(target_arch="x86_64")'.dependencies]
|
||||||
|
sc-service = { version = "0.9.0", default-features = false, features = ["wasmtime"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
async-std = { version = "1.8.0", features = ["attributes"] }
|
async-std = { version = "1.8.0", features = ["attributes"] }
|
||||||
env_logger = "0.8.2"
|
env_logger = "0.8.2"
|
||||||
|
|||||||
+6
-1
@@ -54,6 +54,7 @@ use sc_service::{
|
|||||||
NetworkConfiguration,
|
NetworkConfiguration,
|
||||||
TaskType,
|
TaskType,
|
||||||
TelemetryEndpoints,
|
TelemetryEndpoints,
|
||||||
|
WasmExecutionMethod,
|
||||||
},
|
},
|
||||||
ChainSpec,
|
ChainSpec,
|
||||||
Configuration,
|
Configuration,
|
||||||
@@ -217,6 +218,8 @@ pub struct SubxtClientConfig<C: ChainSpec + 'static> {
|
|||||||
pub role: Role,
|
pub role: Role,
|
||||||
/// Enable telemetry on the given port.
|
/// Enable telemetry on the given port.
|
||||||
pub telemetry: Option<u16>,
|
pub telemetry: Option<u16>,
|
||||||
|
/// Wasm execution method
|
||||||
|
pub wasm_method: WasmExecutionMethod,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<C: ChainSpec + 'static> SubxtClientConfig<C> {
|
impl<C: ChainSpec + 'static> SubxtClientConfig<C> {
|
||||||
@@ -287,7 +290,7 @@ impl<C: ChainSpec + 'static> SubxtClientConfig<C> {
|
|||||||
tracing_receiver: Default::default(),
|
tracing_receiver: Default::default(),
|
||||||
tracing_targets: Default::default(),
|
tracing_targets: Default::default(),
|
||||||
transaction_pool: Default::default(),
|
transaction_pool: Default::default(),
|
||||||
wasm_method: Default::default(),
|
wasm_method: self.wasm_method,
|
||||||
base_path: Default::default(),
|
base_path: Default::default(),
|
||||||
informant_output_format: Default::default(),
|
informant_output_format: Default::default(),
|
||||||
state_pruning: Default::default(),
|
state_pruning: Default::default(),
|
||||||
@@ -362,6 +365,7 @@ mod tests {
|
|||||||
chain_spec,
|
chain_spec,
|
||||||
role: Role::Light,
|
role: Role::Light,
|
||||||
telemetry: None,
|
telemetry: None,
|
||||||
|
wasm_method: Default::default(),
|
||||||
};
|
};
|
||||||
let client = ClientBuilder::<NodeTemplateRuntime>::new()
|
let client = ClientBuilder::<NodeTemplateRuntime>::new()
|
||||||
.set_client(
|
.set_client(
|
||||||
@@ -395,6 +399,7 @@ mod tests {
|
|||||||
chain_spec: test_node::chain_spec::development_config().unwrap(),
|
chain_spec: test_node::chain_spec::development_config().unwrap(),
|
||||||
role: Role::Authority(AccountKeyring::Alice),
|
role: Role::Authority(AccountKeyring::Alice),
|
||||||
telemetry: None,
|
telemetry: None,
|
||||||
|
wasm_method: Default::default(),
|
||||||
};
|
};
|
||||||
let client = ClientBuilder::<NodeTemplateRuntime>::new()
|
let client = ClientBuilder::<NodeTemplateRuntime>::new()
|
||||||
.set_client(
|
.set_client(
|
||||||
|
|||||||
@@ -657,6 +657,7 @@ mod tests {
|
|||||||
chain_spec: test_node::chain_spec::development_config().unwrap(),
|
chain_spec: test_node::chain_spec::development_config().unwrap(),
|
||||||
role: Role::Authority(key),
|
role: Role::Authority(key),
|
||||||
telemetry: None,
|
telemetry: None,
|
||||||
|
wasm_method: Default::default(),
|
||||||
};
|
};
|
||||||
let client = ClientBuilder::new()
|
let client = ClientBuilder::new()
|
||||||
.set_client(
|
.set_client(
|
||||||
|
|||||||
Reference in New Issue
Block a user