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
@@ -21,9 +21,9 @@ use std::collections::HashMap;
use std::sync::{Arc, Weak};
use parking_lot::{RwLock, Mutex};
use runtime_primitives::{generic::BlockId, Justification, StorageOverlay, ChildrenStorageOverlay};
use sr_primitives::{generic::BlockId, Justification, StorageOverlay, ChildrenStorageOverlay};
use state_machine::{Backend as StateBackend, TrieBackend, backend::InMemory as InMemoryState};
use runtime_primitives::traits::{Block as BlockT, NumberFor, Zero, Header};
use sr_primitives::traits::{Block as BlockT, NumberFor, Zero, Header};
use crate::in_mem::{self, check_genesis_storage};
use crate::backend::{
AuxStore, Backend as ClientBackend, BlockImportOperation, RemoteBackend, NewBlockState,
@@ -20,8 +20,8 @@
use std::{sync::{Weak, Arc}, collections::HashMap};
use parking_lot::Mutex;
use runtime_primitives::{Justification, generic::BlockId};
use runtime_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor, Zero};
use sr_primitives::{Justification, generic::BlockId};
use sr_primitives::traits::{Block as BlockT, Header as HeaderT, NumberFor, Zero};
use consensus::well_known_cache_keys;
use crate::backend::{AuxStore, NewBlockState};
@@ -24,8 +24,8 @@ use std::{
use parity_codec::{Encode, Decode};
use primitives::{offchain, H256, Blake2Hasher, convert_hash, NativeOrEncoded};
use runtime_primitives::generic::BlockId;
use runtime_primitives::traits::{One, Block as BlockT, Header as HeaderT};
use sr_primitives::generic::BlockId;
use sr_primitives::traits::{One, Block as BlockT, Header as HeaderT};
use state_machine::{
self, Backend as StateBackend, CodeExecutor, OverlayedChanges,
ExecutionStrategy, create_proof_check_backend,
+2 -2
View File
@@ -24,7 +24,7 @@ use std::future::Future;
use hash_db::{HashDB, Hasher};
use parity_codec::{Decode, Encode};
use primitives::{ChangesTrieConfiguration, convert_hash};
use runtime_primitives::traits::{
use sr_primitives::traits::{
Block as BlockT, Header as HeaderT, Hash, HashFor, NumberFor,
SimpleArithmetic, CheckedConversion,
};
@@ -502,7 +502,7 @@ pub mod tests {
use crate::light::blockchain::tests::{DummyStorage, DummyBlockchain};
use primitives::{blake2_256, Blake2Hasher, H256};
use primitives::storage::{well_known_keys, StorageKey};
use runtime_primitives::generic::BlockId;
use sr_primitives::generic::BlockId;
use state_machine::Backend;
use super::*;
+2 -2
View File
@@ -25,8 +25,8 @@ use std::sync::Arc;
use executor::RuntimeInfo;
use primitives::{H256, Blake2Hasher};
use runtime_primitives::BuildStorage;
use runtime_primitives::traits::Block as BlockT;
use sr_primitives::BuildStorage;
use sr_primitives::traits::Block as BlockT;
use state_machine::CodeExecutor;
use crate::call_executor::LocalCallExecutor;