mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Don't include :code by default in storage proofs (#5060)
* Adds test to verify that the runtime currently is always contained in the proof * Start passing the runtime wasm code from the outside * Fix compilation * More build fixes * Make the test work as expected now :) * Last fixes * Fixes benchmarks * Review feedback * Apply suggestions from code review Co-Authored-By: Sergei Pepyakin <sergei@parity.io> * Review feedback * Fix compilation Co-authored-by: Sergei Pepyakin <s.pepyakin@gmail.com>
This commit is contained in:
committed by
GitHub
parent
67837c6233
commit
6ee39261c8
@@ -338,7 +338,7 @@ mod tests {
|
||||
use sp_io::TestExternalities;
|
||||
use substrate_test_runtime_client::{AccountKeyring, Sr25519Keyring};
|
||||
use crate::{Header, Transfer, WASM_BINARY};
|
||||
use sp_core::{NeverNativeValue, map, traits::CodeExecutor};
|
||||
use sp_core::{NeverNativeValue, map, traits::{CodeExecutor, RuntimeCode}};
|
||||
use sc_executor::{NativeExecutor, WasmExecutionMethod, native_executor_instance};
|
||||
use sp_io::hashing::twox_128;
|
||||
|
||||
@@ -401,8 +401,11 @@ mod tests {
|
||||
fn block_import_works_wasm() {
|
||||
block_import_works(|b, ext| {
|
||||
let mut ext = ext.ext();
|
||||
let runtime_code = RuntimeCode::from_externalities(&ext)
|
||||
.expect("Code is part of the externalities");
|
||||
executor().call::<_, NeverNativeValue, fn() -> _>(
|
||||
&mut ext,
|
||||
&runtime_code,
|
||||
"Core_execute_block",
|
||||
&b.encode(),
|
||||
false,
|
||||
@@ -494,8 +497,11 @@ mod tests {
|
||||
fn block_import_with_transaction_works_wasm() {
|
||||
block_import_with_transaction_works(|b, ext| {
|
||||
let mut ext = ext.ext();
|
||||
let runtime_code = RuntimeCode::from_externalities(&ext)
|
||||
.expect("Code is part of the externalities");
|
||||
executor().call::<_, NeverNativeValue, fn() -> _>(
|
||||
&mut ext,
|
||||
&runtime_code,
|
||||
"Core_execute_block",
|
||||
&b.encode(),
|
||||
false,
|
||||
|
||||
Reference in New Issue
Block a user