Use ranged changes trie configuration in CT functions (#3404)

* CT config methods are accepting zero

* intrduce && use configuration range in CT

* Update core/client/db/src/lib.rs

Co-Authored-By: cheme <emericchevalier.pro@gmail.com>

* full PR URI

* updated next_max_level_digest_range comment

* added skewed digest description

* added comment for loop

* call next_max_level_digest_range from prev_max_level_digest_block

* more test cases

* Update core/state-machine/src/changes_trie/surface_iterator.rs

Co-Authored-By: cheme <emericchevalier.pro@gmail.com>

* updated comment
This commit is contained in:
Svyatoslav Nikolsky
2019-08-29 09:02:10 +03:00
committed by GitHub
parent cc903a126c
commit c26b7163a3
13 changed files with 1252 additions and 487 deletions
+4
View File
@@ -758,6 +758,10 @@ impl<Block, H> state_machine::ChangesTrieStorage<H, NumberFor<Block>> for Change
Block: BlockT,
H: Hasher,
{
fn as_roots_storage(&self) -> &dyn state_machine::ChangesTrieRootsStorage<H, NumberFor<Block>> {
self
}
fn get(&self, key: &H::Out, prefix: Prefix) -> Result<Option<state_machine::DBValue>, String> {
self.0.get(key, prefix)
}