mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +00:00
Move sc-client into sc-service (#5502)
* Drop client from sc-network and sc-client-db, move LongestChain to sc-client-api * move leaves, cht, in_mem to sc-client-api, drop client from sc-finality-grandpa * drop sc-service from sc-rpc * drop sc-service from sc-consensus-aura * drop sc-client from manual-seal and babe * drop sc-client from utils/frame/rpc/system and utils/frame/benchmarking-cli * drop sc-client from bin/node and bin/node-template * drop sc-client * fix tests * remove check -p sc-client from gitlab.yml * fix warnings * fixes ui test * fix light client tests * adds associated Client type to AbstractService * adds UsageProvider to Client * fixed ui test, again * tried and failed to get node-cli to compile for wasm * thanks to tomaka for helping me get node-cli to compile for wasmm * ui test pls pas 🙏🏾 * all tests passing 🪄 * no_run documentation code * rm -f documentation code * ClientProvider * fix mega trait * move LongestChain to sc-consensus, use adds minimal bounds to AbstractService::Client * adds license to sc-consensus Co-authored-by: Benjamin Kampmann <ben@parity.io>
This commit is contained in:
@@ -21,7 +21,7 @@ futures-timer = "3.0.1"
|
||||
rand = "0.7.2"
|
||||
libp2p = { version = "0.18.1", default-features = false, features = ["libp2p-websocket"] }
|
||||
sp-consensus = { version = "0.8.0-dev", path = "../../../primitives/consensus/common" }
|
||||
sc-client = { version = "0.8.0-dev", path = "../../" }
|
||||
sc-consensus = { version = "0.8.0-dev", path = "../../../client/consensus/common" }
|
||||
sc-client-api = { version = "2.0.0-dev", path = "../../api" }
|
||||
sp-blockchain = { version = "2.0.0-dev", path = "../../../primitives/blockchain" }
|
||||
sp-runtime = { version = "2.0.0-dev", path = "../../../primitives/runtime" }
|
||||
@@ -32,3 +32,4 @@ env_logger = "0.7.0"
|
||||
substrate-test-runtime-client = { version = "2.0.0-dev", path = "../../../test-utils/runtime/client" }
|
||||
substrate-test-runtime = { version = "2.0.0-dev", path = "../../../test-utils/runtime" }
|
||||
tempfile = "3.1.0"
|
||||
sc-service = { version = "0.8.0-dev", default-features = false, features = ["test-helpers"], path = "../../service" }
|
||||
|
||||
@@ -27,12 +27,16 @@ use libp2p::build_multiaddr;
|
||||
use log::trace;
|
||||
use sc_network::config::FinalityProofProvider;
|
||||
use sp_blockchain::{
|
||||
Result as ClientResult, well_known_cache_keys::{self, Id as CacheKeyId}, Info as BlockchainInfo,
|
||||
HeaderBackend, Result as ClientResult,
|
||||
well_known_cache_keys::{self, Id as CacheKeyId},
|
||||
Info as BlockchainInfo,
|
||||
};
|
||||
use sc_client_api::{BlockchainEvents, BlockImportNotification, FinalityNotifications, ImportNotifications, FinalityNotification, backend::{TransactionFor, AuxStore, Backend, Finalizer}, BlockBackend};
|
||||
use sc_client_api::{
|
||||
BlockchainEvents, BlockImportNotification, FinalityNotifications, ImportNotifications, FinalityNotification,
|
||||
backend::{TransactionFor, AuxStore, Backend, Finalizer}, BlockBackend,
|
||||
};
|
||||
use sc_consensus::LongestChain;
|
||||
use sc_block_builder::{BlockBuilder, BlockBuilderProvider};
|
||||
use sc_client::LongestChain;
|
||||
use sc_client::blockchain::HeaderBackend;
|
||||
use sc_network::config::Role;
|
||||
use sp_consensus::block_validation::DefaultBlockAnnounceValidator;
|
||||
use sp_consensus::import_queue::{
|
||||
@@ -52,7 +56,7 @@ use sp_runtime::generic::{BlockId, OpaqueDigestItemId};
|
||||
use sp_runtime::traits::{Block as BlockT, Header as HeaderT, NumberFor};
|
||||
use sp_runtime::Justification;
|
||||
use substrate_test_runtime_client::{self, AccountKeyring};
|
||||
|
||||
use sc_service::client::Client;
|
||||
pub use sc_network::config::EmptyTransactionPool;
|
||||
pub use substrate_test_runtime_client::runtime::{Block, Extrinsic, Hash, Transfer};
|
||||
pub use substrate_test_runtime_client::{TestClient, TestClientBuilder, TestClientBuilderExt};
|
||||
@@ -88,10 +92,18 @@ impl<B: BlockT> Verifier<B> for PassThroughVerifier {
|
||||
}
|
||||
}
|
||||
|
||||
pub type PeersFullClient =
|
||||
sc_client::Client<substrate_test_runtime_client::Backend, substrate_test_runtime_client::Executor, Block, substrate_test_runtime_client::runtime::RuntimeApi>;
|
||||
pub type PeersLightClient =
|
||||
sc_client::Client<substrate_test_runtime_client::LightBackend, substrate_test_runtime_client::LightExecutor, Block, substrate_test_runtime_client::runtime::RuntimeApi>;
|
||||
pub type PeersFullClient = Client<
|
||||
substrate_test_runtime_client::Backend,
|
||||
substrate_test_runtime_client::Executor,
|
||||
Block,
|
||||
substrate_test_runtime_client::runtime::RuntimeApi
|
||||
>;
|
||||
pub type PeersLightClient = Client<
|
||||
substrate_test_runtime_client::LightBackend,
|
||||
substrate_test_runtime_client::LightExecutor,
|
||||
Block,
|
||||
substrate_test_runtime_client::runtime::RuntimeApi
|
||||
>;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub enum PeersClient {
|
||||
|
||||
Reference in New Issue
Block a user