mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 04:51:01 +00:00
Refactored in-mem backed to use the actual trie (#5730)
This commit is contained in:
@@ -55,11 +55,21 @@ impl<S: TrieBackendStorage<H>, H: Hasher> TrieBackendEssence<S, H> where H::Out:
|
||||
&self.storage
|
||||
}
|
||||
|
||||
/// Get backend storage reference.
|
||||
pub fn backend_storage_mut(&mut self) -> &mut S {
|
||||
&mut self.storage
|
||||
}
|
||||
|
||||
/// Get trie root.
|
||||
pub fn root(&self) -> &H::Out {
|
||||
&self.root
|
||||
}
|
||||
|
||||
/// Set trie root. This is useful for testing.
|
||||
pub fn set_root(&mut self, root: H::Out) {
|
||||
self.root = root;
|
||||
}
|
||||
|
||||
/// Consumes self and returns underlying storage.
|
||||
pub fn into_storage(self) -> S {
|
||||
self.storage
|
||||
|
||||
Reference in New Issue
Block a user