[big refactor] Remove crate aliasing. (#4395)

* Rename: Phase 1.

* Unify codec.

* Fixing: Phase 2

* Fixing: Phase 3.

* Fixing: Phase 4.

* Fixing: Phase 5.

* Fixing: Phase 6.

* Fixing: Phase 7.

* Fixing: Phase 8. Tests

* Fixing: Phase 9. Tests!!!

* Fixing: Phase 10. Moar tests!

* Finally done!

* More fixes.

* Rename primitives:: to sp_core::

* Apply renames in finality-grandpa.

* Fix benches.

* Fix benches 2.

* Revert node-template.

* Fix frame-system in our modules.
This commit is contained in:
Tomasz Drwięga
2019-12-16 13:36:49 +01:00
committed by Gavin Wood
parent f14d98a439
commit 8778ca7dc8
485 changed files with 4023 additions and 4005 deletions
+16 -17
View File
@@ -22,10 +22,10 @@
use super::*;
use authorship::claim_slot;
use babe_primitives::{AuthorityPair, SlotNumber};
use block_builder::BlockBuilder;
use consensus_common::NoNetwork as DummyOracle;
use consensus_common::import_queue::{
use sp_consensus_babe::{AuthorityPair, SlotNumber};
use sc_block_builder::BlockBuilder;
use sp_consensus::NoNetwork as DummyOracle;
use sp_consensus::import_queue::{
BoxBlockImport, BoxJustificationImport, BoxFinalityProofImport,
};
use sc_network_test::*;
@@ -33,8 +33,7 @@ use sc_network_test::{Block as TestBlock, PeersClient};
use sc_network::config::{BoxFinalityProofRequestBuilder, ProtocolConfig};
use sp_runtime::{generic::DigestItem, traits::{Block as BlockT, DigestFor}};
use tokio::runtime::current_thread;
use client_api::BlockchainEvents;
use test_client;
use sc_client_api::BlockchainEvents;
use log::debug;
use std::{time::Duration, cell::RefCell};
@@ -42,11 +41,11 @@ type Item = DigestItem<Hash>;
type Error = sp_blockchain::Error;
type TestClient = client::Client<
test_client::Backend,
test_client::Executor,
type TestClient = sc_client::Client<
substrate_test_runtime_client::Backend,
substrate_test_runtime_client::Executor,
TestBlock,
test_client::runtime::RuntimeApi,
substrate_test_runtime_client::runtime::RuntimeApi,
>;
#[derive(Copy, Clone, PartialEq)]
@@ -196,10 +195,10 @@ type TestExtrinsic = <TestBlock as BlockT>::Extrinsic;
pub struct TestVerifier {
inner: BabeVerifier<
test_client::Backend,
test_client::Executor,
substrate_test_runtime_client::Backend,
substrate_test_runtime_client::Executor,
TestBlock,
test_client::runtime::RuntimeApi,
substrate_test_runtime_client::runtime::RuntimeApi,
PeersFullClient,
>,
mutator: Mutator,
@@ -358,7 +357,7 @@ fn run_one_test(
let select_chain = peer.select_chain().expect("Full client has select_chain");
let keystore_path = tempfile::tempdir().expect("Creates keystore path");
let keystore = keystore::Store::open(keystore_path.path(), None).expect("Creates keystore");
let keystore = sc_keystore::Store::open(keystore_path.path(), None).expect("Creates keystore");
keystore.write().insert_ephemeral_from_seed::<AuthorityPair>(seed).expect("Generates authority key");
keystore_paths.push(keystore_path);
@@ -403,7 +402,7 @@ fn run_one_test(
force_authoring: false,
babe_link: data.link.clone(),
keystore,
can_author_with: consensus_common::AlwaysCanAuthor,
can_author_with: sp_consensus::AlwaysCanAuthor,
}).expect("Starts babe"));
}
@@ -483,7 +482,7 @@ fn sig_is_not_pre_digest() {
fn can_author_block() {
let _ = env_logger::try_init();
let keystore_path = tempfile::tempdir().expect("Creates keystore path");
let keystore = keystore::Store::open(keystore_path.path(), None).expect("Creates keystore");
let keystore = sc_keystore::Store::open(keystore_path.path(), None).expect("Creates keystore");
let pair = keystore.write().insert_ephemeral_from_seed::<AuthorityPair>("//Alice")
.expect("Generates authority pair");
@@ -634,7 +633,7 @@ fn importing_block_one_sets_genesis_epoch() {
#[test]
fn importing_epoch_change_block_prunes_tree() {
use client_api::Finalizer;
use sc_client_api::Finalizer;
let mut net = BabeTestNet::new(1);