Remove native call (#12201)

* Remove native call

With the recent introduction of staging runtime apis the native call wasn't supported anymore. This
removes the entire support for this as it is not used anymore.

* FMT

* Fix benchmarks

* FIX ui tests
This commit is contained in:
Bastian Köcher
2022-09-12 11:25:56 +01:00
committed by GitHub
parent 5647e71947
commit b356a5589a
17 changed files with 211 additions and 705 deletions
+2 -7
View File
@@ -20,7 +20,6 @@
use std::{
borrow::Cow,
fmt::{Debug, Display},
panic::UnwindSafe,
};
pub use sp_externalities::{Externalities, ExternalitiesExt};
@@ -32,18 +31,14 @@ pub trait CodeExecutor: Sized + Send + Sync + ReadRuntimeVersion + Clone + 'stat
/// Call a given method in the runtime. Returns a tuple of the result (either the output data
/// or an execution error) together with a `bool`, which is true if native execution was used.
fn call<
R: codec::Codec + PartialEq,
NC: FnOnce() -> Result<R, Box<dyn std::error::Error + Send + Sync>> + UnwindSafe,
>(
fn call(
&self,
ext: &mut dyn Externalities,
runtime_code: &RuntimeCode,
method: &str,
data: &[u8],
use_native: bool,
native_call: Option<NC>,
) -> (Result<crate::NativeOrEncoded<R>, Self::Error>, bool);
) -> (Result<Vec<u8>, Self::Error>, bool);
}
/// Something that can fetch the runtime `:code`.