Use prefixed keys for trie node. (#2130)

* Account for pending insertions when pruning

* Prefixed trie storage

* Comments

* Prefixed trie storage

* Fixed tests

* Fixed tests

* Bumped runtime version

* Bumped runtime version again
This commit is contained in:
Arkadiy Paronyan
2019-03-28 18:46:21 +01:00
committed by Gav Wood
parent f9d0da0a18
commit 7046e13de2
29 changed files with 295 additions and 266 deletions
+2 -2
View File
@@ -742,8 +742,8 @@ impl<H: Hasher> state_machine::ChangesTrieRootsStorage<H> for ChangesTrieStorage
}
impl<H: Hasher> state_machine::ChangesTrieStorage<H> for ChangesTrieStorage<H> where H::Out: HeapSizeOf {
fn get(&self, key: &H::Out) -> Result<Option<state_machine::DBValue>, String> {
self.0.get(key)
fn get(&self, key: &H::Out, prefix: &[u8]) -> Result<Option<state_machine::DBValue>, String> {
self.0.get(key, prefix)
}
}