mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 20:21:03 +00:00
* Companion for #3007: Track teleported assets * Bump * Try fix the breakage Co-authored-by: Sergei Shulepov <sergei@parity.io>
This commit is contained in:
@@ -27,7 +27,6 @@ use sc_executor::{
|
||||
};
|
||||
use sp_blockchain::HeaderBackend;
|
||||
use sp_consensus::SelectChain;
|
||||
use sp_core::traits::CallInWasm;
|
||||
use sp_io::TestExternalities;
|
||||
use sp_keyring::AccountKeyring::*;
|
||||
use sp_runtime::{
|
||||
@@ -42,6 +41,8 @@ fn call_validate_block(
|
||||
block_data: ParachainBlockData<Block>,
|
||||
relay_parent_storage_root: Hash,
|
||||
) -> Result<Header> {
|
||||
use sc_executor_common::runtime_blob::RuntimeBlob;
|
||||
|
||||
let mut ext = TestExternalities::default();
|
||||
let mut ext_ext = ext.ext();
|
||||
let params = ValidationParams {
|
||||
@@ -61,13 +62,15 @@ fn call_validate_block(
|
||||
);
|
||||
|
||||
executor
|
||||
.call_in_wasm(
|
||||
&WASM_BINARY.expect("You need to build the WASM binaries to run the tests!"),
|
||||
None,
|
||||
.uncached_call(
|
||||
RuntimeBlob::uncompress_if_needed(
|
||||
&WASM_BINARY.expect("You need to build the WASM binaries to run the tests!"),
|
||||
)
|
||||
.expect("RuntimeBlob uncompress & parse"),
|
||||
&mut ext_ext,
|
||||
false,
|
||||
"validate_block",
|
||||
¶ms,
|
||||
&mut ext_ext,
|
||||
sp_core::traits::MissingHostFunctions::Disallow,
|
||||
)
|
||||
.map(|v| ValidationResult::decode(&mut &v[..]).expect("Decode `ValidationResult`."))
|
||||
.map(|v| Header::decode(&mut &v.head_data.0[..]).expect("Decode `Header`."))
|
||||
|
||||
Reference in New Issue
Block a user