mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 02:48:03 +00:00
Companion for Substrate#10394 (#4471)
* Align PVF executor to changes in Substrate * Update to the newest `substrate`
This commit is contained in:
@@ -22,7 +22,6 @@ use sc_executor_common::{
|
||||
};
|
||||
use sc_executor_wasmtime::{Config, DeterministicStackLimit, Semantics};
|
||||
use sp_core::storage::{ChildInfo, TrackedStorageKey};
|
||||
use sp_wasm_interface::HostFunctions as _;
|
||||
use std::any::{Any, TypeId};
|
||||
|
||||
const CONFIG: Config = Config {
|
||||
@@ -114,10 +113,9 @@ pub unsafe fn execute(
|
||||
let mut ext = ValidationExternalities(extensions);
|
||||
|
||||
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,
|
||||
CONFIG,
|
||||
HostFunctions::host_functions(),
|
||||
)?;
|
||||
runtime.new_instance()?.call(InvokeMethod::Export("validate_block"), params)
|
||||
})?
|
||||
|
||||
Reference in New Issue
Block a user