mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 01:07: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:
@@ -289,7 +289,7 @@ mod execution {
|
||||
|
||||
let result = self
|
||||
.exec
|
||||
.call(&mut ext, self.runtime_code, self.method, self.call_data, false, self.context)
|
||||
.call(&mut ext, self.runtime_code, self.method, self.call_data, self.context)
|
||||
.0;
|
||||
|
||||
self.overlay
|
||||
@@ -1120,10 +1120,9 @@ mod tests {
|
||||
_: &RuntimeCode,
|
||||
_method: &str,
|
||||
_data: &[u8],
|
||||
use_native: bool,
|
||||
_: CallContext,
|
||||
) -> (CallResult<Self::Error>, bool) {
|
||||
let using_native = use_native && self.native_available;
|
||||
let using_native = self.native_available;
|
||||
match (using_native, self.native_succeeds, self.fallback_succeeds) {
|
||||
(true, true, _) | (false, _, true) => (
|
||||
Ok(vec![
|
||||
|
||||
Reference in New Issue
Block a user