Set StateBackend::Transaction to PrefixedMemoryDB (#14612)

* Yep

* Try to get it working everywhere

* Make `from_raw_storage` start with an empty db

* More fixes!

* Make everything compile

* Fix `child_storage_root`

* Fix after merge

* Cleanups

* Update primitives/state-machine/src/overlayed_changes/mod.rs

Co-authored-by: Davide Galassi <davxy@datawok.net>

* Review comments

* Fix issues

* Silence warning

* FMT

* Clippy

---------

Co-authored-by: Davide Galassi <davxy@datawok.net>
This commit is contained in:
Bastian KöcherandDavide Galassi authored and GitHub committed 2023-08-17 10:49:38 +00:00
1 parent a892fa7f92
commit ecf8035da6
67 files changed
+750 -1150

No files matched your search

-2
View File
@@ -816,10 +816,8 @@ fn test_witness(proof: StorageProof, root: crate::Hash) {
let db: sp_trie::MemoryDB<crate::Hashing> = proof.into_memory_db();
let backend = sp_state_machine::TrieBackendBuilder::<_, crate::Hashing>::new(db, root).build();
let mut overlay = sp_state_machine::OverlayedChanges::default();
let mut cache = sp_state_machine::StorageTransactionCache::<_, _>::default();
let mut ext = sp_state_machine::Ext::new(
&mut overlay,
&mut cache,
&backend,
#[cfg(feature = "std")]
None,