Companion for Substrate#14612 (#2923)

* Companion for Substrate#14612

https://github.com/paritytech/substrate/pull/14612

* Remove patch

* Cargo.lock

* Fix

* Fix compilation

* Fix Fix

* ...

* :face_palm:

* .................

* update lockfile for {"polkadot", "substrate"}

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Bastian Köcher
2023-08-17 14:39:09 +02:00
committed by GitHub
parent 061eee1382
commit 02691d94d8
20 changed files with 332 additions and 398 deletions
+3 -2
View File
@@ -19,8 +19,8 @@ use cumulus_primitives_core::{
};
use polkadot_primitives::UpgradeGoAhead;
use sp_runtime::traits::HashingFor;
use sp_state_machine::MemoryDB;
use sp_std::collections::btree_map::BTreeMap;
use sp_trie::PrefixedMemoryDB;
/// Builds a sproof (portmanteau of 'spoof' and 'proof') of the relay chain state.
#[derive(Clone)]
@@ -105,7 +105,8 @@ impl RelayStateSproofBuilder {
pub fn into_state_root_and_proof(
self,
) -> (polkadot_primitives::Hash, sp_state_machine::StorageProof) {
let (db, root) = MemoryDB::<HashingFor<polkadot_primitives::Block>>::default_with_root();
let (db, root) =
PrefixedMemoryDB::<HashingFor<polkadot_primitives::Block>>::default_with_root();
let state_version = Default::default(); // for test using default.
let mut backend = sp_state_machine::TrieBackendBuilder::new(db, root).build();