mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +00:00
Improve CodeExecutor (#2358)
Since `sp-state-machine` and `GenesisConfigBuilderRuntimeCaller` always set `use_native` to be false. We should remove this param and make `NativeElseWasmExecutor` behave like its name. It could make the above components use the correct execution strategy. Maybe polkadot do not need about `NativeElseWasmExecutor` anymore. But it is still needed by other chains and it's useful for debugging. --------- Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: command-bot <> Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
This commit is contained in:
@@ -263,9 +263,10 @@ impl<Block: BlockT, D, Backend, G: GenesisInit>
|
||||
D: sc_executor::NativeExecutionDispatch + 'static,
|
||||
Backend: sc_client_api::backend::Backend<Block> + 'static,
|
||||
{
|
||||
let executor = executor.into().unwrap_or_else(|| {
|
||||
let mut executor = executor.into().unwrap_or_else(|| {
|
||||
NativeElseWasmExecutor::new_with_wasm_executor(WasmExecutor::builder().build())
|
||||
});
|
||||
executor.disable_use_native();
|
||||
let executor = LocalCallExecutor::new(
|
||||
self.backend.clone(),
|
||||
executor.clone(),
|
||||
|
||||
Reference in New Issue
Block a user