mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 06:31:03 +00:00
[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:
committed by
Gavin Wood
parent
f14d98a439
commit
8778ca7dc8
@@ -22,7 +22,7 @@ mod tests;
|
||||
use std::{sync::Arc, convert::TryInto};
|
||||
use log::warn;
|
||||
|
||||
use client::Client;
|
||||
use sc_client::Client;
|
||||
use sp_blockchain::Error as ClientError;
|
||||
|
||||
use rpc::futures::{
|
||||
@@ -31,20 +31,20 @@ use rpc::futures::{
|
||||
};
|
||||
use futures::{StreamExt as _, compat::Compat};
|
||||
use futures::future::{ready, FutureExt, TryFutureExt};
|
||||
use api::Subscriptions;
|
||||
use sc_rpc_api::Subscriptions;
|
||||
use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId};
|
||||
use codec::{Encode, Decode};
|
||||
use primitives::{Bytes, Blake2Hasher, H256, traits::BareCryptoStorePtr};
|
||||
use sp_core::{Bytes, Blake2Hasher, H256, traits::BareCryptoStorePtr};
|
||||
use sp_api::ConstructRuntimeApi;
|
||||
use sp_runtime::{generic, traits::{self, ProvideRuntimeApi}};
|
||||
use txpool_api::{
|
||||
use sp_transaction_pool::{
|
||||
TransactionPool, InPoolTransaction, TransactionStatus,
|
||||
BlockHash, TxHash, TransactionFor, error::IntoPoolError,
|
||||
};
|
||||
use session::SessionKeys;
|
||||
use sp_session::SessionKeys;
|
||||
|
||||
/// Re-export the API for backward compatibility.
|
||||
pub use api::author::*;
|
||||
pub use sc_rpc_api::author::*;
|
||||
use self::error::{Error, FutureResult, Result};
|
||||
|
||||
/// Authoring API
|
||||
@@ -78,8 +78,8 @@ impl<B, E, P, Block: traits::Block, RA> Author<B, E, P, Block, RA> {
|
||||
|
||||
impl<B, E, P, Block, RA> AuthorApi<Block::Hash, Block::Hash> for Author<B, E, P, Block, RA> where
|
||||
Block: traits::Block<Hash=H256>,
|
||||
B: client_api::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
|
||||
E: client_api::CallExecutor<Block, Blake2Hasher> + Clone + Send + Sync + 'static,
|
||||
B: sc_client_api::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
|
||||
E: sc_client_api::CallExecutor<Block, Blake2Hasher> + Clone + Send + Sync + 'static,
|
||||
P: TransactionPool<Block=Block, Hash=Block::Hash> + Sync + Send + 'static,
|
||||
RA: ConstructRuntimeApi<Block, Client<B, E, Block, RA>> + Send + Sync + 'static,
|
||||
Client<B, E, Block, RA>: ProvideRuntimeApi,
|
||||
|
||||
@@ -19,16 +19,16 @@ use super::*;
|
||||
use std::sync::Arc;
|
||||
use assert_matches::assert_matches;
|
||||
use codec::Encode;
|
||||
use primitives::{
|
||||
use sp_core::{
|
||||
H256, blake2_256, hexdisplay::HexDisplay, testing::{ED25519, SR25519, KeyStore}, traits::BareCryptoStorePtr, ed25519,
|
||||
crypto::Pair,
|
||||
};
|
||||
use rpc::futures::Stream as _;
|
||||
use test_client::{
|
||||
use substrate_test_runtime_client::{
|
||||
self, AccountKeyring, runtime::{Extrinsic, Transfer, SessionKeys, RuntimeApi, Block},
|
||||
DefaultTestClientBuilderExt, TestClientBuilderExt, Backend, Client, Executor,
|
||||
};
|
||||
use txpool::{BasicPool, FullChainApi};
|
||||
use sc_transaction_pool::{BasicPool, FullChainApi};
|
||||
use tokio::runtime;
|
||||
|
||||
fn uxt(sender: AccountKeyring, nonce: u64) -> Extrinsic {
|
||||
@@ -56,7 +56,7 @@ struct TestSetup {
|
||||
impl Default for TestSetup {
|
||||
fn default() -> Self {
|
||||
let keystore = KeyStore::new();
|
||||
let client = Arc::new(test_client::TestClientBuilder::new().set_keystore(keystore.clone()).build());
|
||||
let client = Arc::new(substrate_test_runtime_client::TestClientBuilder::new().set_keystore(keystore.clone()).build());
|
||||
let pool = Arc::new(BasicPool::new(Default::default(), FullChainApi::new(client.clone())));
|
||||
TestSetup {
|
||||
runtime: runtime::Runtime::new().expect("Failed to create runtime in test setup"),
|
||||
|
||||
Reference in New Issue
Block a user