mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 07:17:56 +00:00
InMemoryBackend: Make it generic over the key hasher (#11488)
* InMemoryBackend: Make it generic over the key hasher * Update primitives/state-machine/src/in_memory_backend.rs Co-authored-by: cheme <emericchevalier.pro@gmail.com> * Update primitives/state-machine/src/in_memory_backend.rs Co-authored-by: cheme <emericchevalier.pro@gmail.com> * FMT Co-authored-by: cheme <emericchevalier.pro@gmail.com>
This commit is contained in:
@@ -30,7 +30,7 @@ use sp_core::{
|
||||
Blake2Hasher,
|
||||
};
|
||||
use sp_externalities::{Extension, Extensions};
|
||||
use sp_trie::{empty_child_trie_root, LayoutV0, LayoutV1, TrieConfiguration};
|
||||
use sp_trie::{empty_child_trie_root, HashKey, LayoutV0, LayoutV1, TrieConfiguration};
|
||||
use std::{
|
||||
any::{Any, TypeId},
|
||||
collections::BTreeMap,
|
||||
@@ -310,7 +310,7 @@ impl Externalities for BasicExternalities {
|
||||
) -> Vec<u8> {
|
||||
if let Some(child) = self.inner.children_default.get(child_info.storage_key()) {
|
||||
let delta = child.data.iter().map(|(k, v)| (k.as_ref(), Some(v.as_ref())));
|
||||
crate::in_memory_backend::new_in_mem::<Blake2Hasher>()
|
||||
crate::in_memory_backend::new_in_mem::<Blake2Hasher, HashKey<_>>()
|
||||
.child_storage_root(&child.child_info, delta, state_version)
|
||||
.0
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user