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
@@ -681,6 +681,10 @@ impl<Block> state_machine::ChangesTrieStorage<Blake2Hasher, NumberFor<Block>>
where
Block: BlockT<Hash=H256>,
{
fn as_roots_storage(&self) -> &dyn state_machine::ChangesTrieRootsStorage<Blake2Hasher, NumberFor<Block>> {
self
}
fn get(&self, key: &H256, _prefix: Prefix) -> Result<Option<DBValue>, String> {
self.db.get(columns::CHANGES_TRIE, &key[..])
.map_err(|err| format!("{}", err))