mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Make choosing an executor (native/wasm) an explicit part of service construction (#9525)
* Split native executor stuff from wasm executor stuff * Remove `native_runtime_version` in places * Fix warning * Fix test warning * Remove redundant NativeRuntimeInfo trait * Add a warning for use_native * Run cargo fmt * Revert "Add a warning for use_native" This reverts commit 9494f765a06037e991dd60524f2ed1b14649bfd6. * Make choosing an executor (native/wasm) an explicit part of service construction * Add Cargo.lock * Rename Executor to ExecutorDispatch * Update bin/node/executor/src/lib.rs Co-authored-by: Squirrel <gilescope@gmail.com> * Fix tests * Fix minor node-executor error * Fix node cli command thing Co-authored-by: Squirrel <gilescope@gmail.com>
This commit is contained in:
@@ -18,13 +18,13 @@
|
||||
//! A `CodeExecutor` specialization which uses natively compiled runtime when the wasm to be
|
||||
//! executed is equivalent to the natively compiled code.
|
||||
|
||||
pub use sc_executor::NativeExecutor;
|
||||
pub use sc_executor::NativeElseWasmExecutor;
|
||||
|
||||
// Declare an instance of the native executor named `Executor`. Include the wasm binary as the
|
||||
// equivalent wasm code.
|
||||
pub struct Executor;
|
||||
// Declare an instance of the native executor named `ExecutorDispatch`. Include the wasm binary as
|
||||
// the equivalent wasm code.
|
||||
pub struct ExecutorDispatch;
|
||||
|
||||
impl sc_executor::NativeExecutionDispatch for Executor {
|
||||
impl sc_executor::NativeExecutionDispatch for ExecutorDispatch {
|
||||
type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
|
||||
|
||||
fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
|
||||
|
||||
Reference in New Issue
Block a user