Refactor sr_primitives. (#3214)

* refactor sr_primitives.

* Fix try build error.

* Line-width

* Ui test.

* Final fixes.

* Fix build again.

* bring back ui test.

* Fix unsigned import.

* Another ui fix.

* Also refactor substrate-primitives

* Fix benchmarks.

* Fix doc test.

* fix doc tests
This commit is contained in:
Kian Paimani
2019-07-29 14:43:53 +02:00
committed by Bastian Köcher
parent cf80af9255
commit 79feb23a22
259 changed files with 667 additions and 665 deletions
+2 -2
View File
@@ -144,7 +144,7 @@ where
///
/// `child_trie_root` and `child_delta_trie_root` can panic if invalid value is provided to them.
pub fn is_child_trie_key_valid<H: Hasher>(storage_key: &[u8]) -> bool {
use substrate_primitives::storage::well_known_keys;
use primitives::storage::well_known_keys;
let has_right_prefix = storage_key.starts_with(b":child_storage:default:");
if has_right_prefix {
// This is an attempt to catch a change of `is_child_storage_key`, which
@@ -332,7 +332,7 @@ fn branch_node(has_value: bool, has_children: impl Iterator<Item = bool>) -> [u8
mod tests {
use super::*;
use codec::{Encode, Compact};
use substrate_primitives::Blake2Hasher;
use primitives::Blake2Hasher;
use hash_db::{HashDB, Hasher};
use trie_db::{DBValue, TrieMut, Trie};
use trie_standardmap::{Alphabet, ValueMode, StandardMap};