mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-24 05:25:48 +00:00
Companion for Substrate#10394 (#4471)
* Align PVF executor to changes in Substrate * Update to the newest `substrate`
This commit is contained in:
Generated
+167
-165
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,6 @@ use sc_executor_common::{
|
|||||||
};
|
};
|
||||||
use sc_executor_wasmtime::{Config, DeterministicStackLimit, Semantics};
|
use sc_executor_wasmtime::{Config, DeterministicStackLimit, Semantics};
|
||||||
use sp_core::storage::{ChildInfo, TrackedStorageKey};
|
use sp_core::storage::{ChildInfo, TrackedStorageKey};
|
||||||
use sp_wasm_interface::HostFunctions as _;
|
|
||||||
use std::any::{Any, TypeId};
|
use std::any::{Any, TypeId};
|
||||||
|
|
||||||
const CONFIG: Config = Config {
|
const CONFIG: Config = Config {
|
||||||
@@ -114,10 +113,9 @@ pub unsafe fn execute(
|
|||||||
let mut ext = ValidationExternalities(extensions);
|
let mut ext = ValidationExternalities(extensions);
|
||||||
|
|
||||||
sc_executor::with_externalities_safe(&mut ext, || {
|
sc_executor::with_externalities_safe(&mut ext, || {
|
||||||
let runtime = sc_executor_wasmtime::create_runtime_from_artifact(
|
let runtime = sc_executor_wasmtime::create_runtime_from_artifact::<HostFunctions>(
|
||||||
compiled_artifact,
|
compiled_artifact,
|
||||||
CONFIG,
|
CONFIG,
|
||||||
HostFunctions::host_functions(),
|
|
||||||
)?;
|
)?;
|
||||||
runtime.new_instance()?.call(InvokeMethod::Export("validate_block"), params)
|
runtime.new_instance()?.call(InvokeMethod::Export("validate_block"), params)
|
||||||
})?
|
})?
|
||||||
|
|||||||
Reference in New Issue
Block a user