[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
+10 -10
View File
@@ -16,19 +16,19 @@
use super::*;
use assert_matches::assert_matches;
use test_client::{
use substrate_test_runtime_client::{
prelude::*,
consensus::BlockOrigin,
sp_consensus::BlockOrigin,
runtime::{H256, Block, Header},
};
use rpc_primitives::list::ListOrValue;
use sp_rpc::list::ListOrValue;
#[test]
fn should_return_header() {
let core = ::tokio::runtime::Runtime::new().unwrap();
let remote = core.executor();
let client = Arc::new(test_client::new());
let client = Arc::new(substrate_test_runtime_client::new());
let api = new_full(client.clone(), Subscriptions::new(Arc::new(remote)));
assert_matches!(
@@ -64,7 +64,7 @@ fn should_return_a_block() {
let core = ::tokio::runtime::Runtime::new().unwrap();
let remote = core.executor();
let client = Arc::new(test_client::new());
let client = Arc::new(substrate_test_runtime_client::new());
let api = new_full(client.clone(), Subscriptions::new(Arc::new(remote)));
let block = client.new_block(Default::default()).unwrap().bake().unwrap();
@@ -116,7 +116,7 @@ fn should_return_block_hash() {
let core = ::tokio::runtime::Runtime::new().unwrap();
let remote = core.executor();
let client = Arc::new(test_client::new());
let client = Arc::new(substrate_test_runtime_client::new());
let api = new_full(client.clone(), Subscriptions::new(Arc::new(remote)));
assert_matches!(
@@ -147,7 +147,7 @@ fn should_return_block_hash() {
Ok(ListOrValue::Value(Some(ref x))) if x == &block.hash()
);
assert_matches!(
api.block_hash(Some(ListOrValue::Value(primitives::U256::from(1u64).into())).into()),
api.block_hash(Some(ListOrValue::Value(sp_core::U256::from(1u64).into())).into()),
Ok(ListOrValue::Value(Some(ref x))) if x == &block.hash()
);
@@ -163,7 +163,7 @@ fn should_return_finalized_hash() {
let core = ::tokio::runtime::Runtime::new().unwrap();
let remote = core.executor();
let client = Arc::new(test_client::new());
let client = Arc::new(substrate_test_runtime_client::new());
let api = new_full(client.clone(), Subscriptions::new(Arc::new(remote)));
assert_matches!(
@@ -195,7 +195,7 @@ fn should_notify_about_latest_block() {
let (subscriber, id, transport) = Subscriber::new_test("test");
{
let client = Arc::new(test_client::new());
let client = Arc::new(substrate_test_runtime_client::new());
let api = new_full(client.clone(), Subscriptions::new(Arc::new(remote)));
api.subscribe_new_heads(Default::default(), subscriber);
@@ -224,7 +224,7 @@ fn should_notify_about_finalized_block() {
let (subscriber, id, transport) = Subscriber::new_test("test");
{
let client = Arc::new(test_client::new());
let client = Arc::new(substrate_test_runtime_client::new());
let api = new_full(client.clone(), Subscriptions::new(Arc::new(remote)));
api.subscribe_finalized_heads(Default::default(), subscriber);