[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
+15 -15
View File
@@ -30,14 +30,14 @@ use rpc::{
futures::{stream, Future, Sink, Stream},
};
use api::Subscriptions;
use client::{
use sc_rpc_api::Subscriptions;
use sc_client::{
self, Client, BlockchainEvents,
light::{fetcher::Fetcher, blockchain::RemoteBlockchain},
};
use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId};
use primitives::{H256, Blake2Hasher};
use rpc_primitives::{number::NumberOrHex, list::ListOrValue};
use sp_core::{H256, Blake2Hasher};
use sp_rpc::{number::NumberOrHex, list::ListOrValue};
use sp_runtime::{
generic::{BlockId, SignedBlock},
traits::{Block as BlockT, Header, NumberFor},
@@ -45,14 +45,14 @@ use sp_runtime::{
use self::error::{Result, Error, FutureResult};
pub use api::chain::*;
pub use sc_rpc_api::chain::*;
/// Blockchain backend API
trait ChainBackend<B, E, Block: BlockT, RA>: Send + Sync + 'static
where
Block: BlockT<Hash=H256> + 'static,
B: client_api::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
E: client::CallExecutor<Block, Blake2Hasher> + Send + Sync + 'static,
B: sc_client_api::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
E: sc_client::CallExecutor<Block, Blake2Hasher> + Send + Sync + 'static,
{
/// Get client reference.
fn client(&self) -> &Arc<Client<B, E, Block, RA>>;
@@ -156,8 +156,8 @@ pub fn new_full<B, E, Block: BlockT, RA>(
) -> Chain<B, E, Block, RA>
where
Block: BlockT<Hash=H256> + 'static,
B: client_api::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
E: client::CallExecutor<Block, Blake2Hasher> + Send + Sync + 'static + Clone,
B: sc_client_api::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
E: sc_client::CallExecutor<Block, Blake2Hasher> + Send + Sync + 'static + Clone,
RA: Send + Sync + 'static,
{
Chain {
@@ -174,8 +174,8 @@ pub fn new_light<B, E, Block: BlockT, RA, F: Fetcher<Block>>(
) -> Chain<B, E, Block, RA>
where
Block: BlockT<Hash=H256> + 'static,
B: client_api::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
E: client::CallExecutor<Block, Blake2Hasher> + Send + Sync + 'static + Clone,
B: sc_client_api::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
E: sc_client::CallExecutor<Block, Blake2Hasher> + Send + Sync + 'static + Clone,
RA: Send + Sync + 'static,
F: Send + Sync + 'static,
{
@@ -196,8 +196,8 @@ pub struct Chain<B, E, Block: BlockT, RA> {
impl<B, E, Block, RA> ChainApi<NumberFor<Block>, Block::Hash, Block::Header, SignedBlock<Block>> for Chain<B, E, Block, RA> where
Block: BlockT<Hash=H256> + 'static,
B: client_api::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
E: client::CallExecutor<Block, Blake2Hasher> + Send + Sync + 'static,
B: sc_client_api::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
E: sc_client::CallExecutor<Block, Blake2Hasher> + Send + Sync + 'static,
RA: Send + Sync + 'static
{
type Metadata = crate::metadata::Metadata;
@@ -256,8 +256,8 @@ fn subscribe_headers<B, E, Block, RA, F, G, S, ERR>(
stream: F,
) where
Block: BlockT<Hash=H256> + 'static,
B: client_api::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
E: client::CallExecutor<Block, Blake2Hasher> + Send + Sync + 'static,
B: sc_client_api::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
E: sc_client::CallExecutor<Block, Blake2Hasher> + Send + Sync + 'static,
F: FnOnce() -> S,
G: FnOnce() -> Block::Hash,
ERR: ::std::fmt::Debug,