Remove all (non-dev) client references from frame, activate dependency enforcer (#4184)

* Move transaction pool to primitives

* move backend, errors into primitives

* remove unused client depencies

* Move rpc-api into primitives

* Move peerset back to client

* Move rpc/api back to client, move palette/support/rpc into utils

* move support-rpc into subfolder

* move system-rpc into utils

* move transaction-pool  and -graph back into client

* fix broken imports

* Clean up test primitives

* Make support test utils independent of frame

* remove unnecessary node dependencies from service

* Reactivate dependency script:
 - only enforce the now achieved status quo will remain
 - allow for primitives to depend on /client for now without failing
 - more discriptive error message so people understand, what it wants
 - minor fix to differentiative between ../client and /client (which may be a subfolder)
 - don't allow this to fail anylonger.

* fix doc comment

* 'Should not' rather than 'must not'.

* Revert unwanted dependency changes

* fix faulty import

* fixup derive_more version

* fix wrong import path
This commit is contained in:
Benjamin Kampmann
2019-11-26 21:38:28 +01:00
committed by GitHub
parent b2aab98e69
commit bd652793db
130 changed files with 836 additions and 816 deletions
+2 -4
View File
@@ -31,6 +31,7 @@ target_info = "0.1.0"
keystore = { package = "substrate-keystore", path = "../keystore" }
sr-io = { path = "../../primitives/sr-io" }
sr-primitives = { path = "../../primitives/sr-primitives" }
sp-blockchain = { path = "../../primitives/blockchain" }
primitives = { package = "substrate-primitives", path = "../../primitives/core" }
session = { package = "substrate-session", path = "../../primitives/session" }
app-crypto = { package = "substrate-application-crypto", path = "../../primitives/application-crypto" }
@@ -44,7 +45,7 @@ tx-pool-api = { package = "substrate-transaction-pool-runtime-api", path = "../.
client_db = { package = "substrate-client-db", path = "../db" }
codec = { package = "parity-scale-codec", version = "1.0.0" }
substrate-executor = { path = "../executor" }
transaction_pool = { package = "substrate-transaction-pool", path = "../transaction-pool" }
transaction_pool = { package = "sc-transaction-pool", path = "../../client/transaction-pool" }
rpc-servers = { package = "substrate-rpc-servers", path = "../rpc-servers" }
rpc = { package = "substrate-rpc", path = "../rpc" }
tel = { package = "substrate-telemetry", path = "../telemetry" }
@@ -56,9 +57,6 @@ tracing = "0.1.10"
[dev-dependencies]
substrate-test-runtime-client = { path = "../../test/utils/runtime/client" }
node-executor = { path = "../../bin/node/executor" }
node-primitives = { path = "../../bin/node/primitives" }
node-runtime = { path = "../../bin/node/runtime" }
babe-primitives = { package = "substrate-consensus-babe-primitives", path = "../../primitives/consensus/babe" }
grandpa = { package = "substrate-finality-grandpa", path = "../finality-grandpa" }
grandpa-primitives = { package = "substrate-finality-grandpa-primitives", path = "../../primitives/finality-grandpa" }
+2 -1
View File
@@ -54,6 +54,7 @@ use std::{
use sysinfo::{get_current_pid, ProcessExt, System, SystemExt};
use tel::{telemetry, SUBSTRATE_INFO};
use transaction_pool::txpool::{self, ChainApi, Pool as TransactionPool};
use sp_blockchain;
use grafana_data_source::{self, record_metrics};
/// Aggregator for the components required to build a service.
@@ -765,7 +766,7 @@ ServiceBuilder<
offchain::OffchainWorkerApi<TBl> +
tx_pool_api::TaggedTransactionQueue<TBl> +
session::SessionKeys<TBl> +
sr_api::ApiExt<TBl, Error = client::error::Error>,
sr_api::ApiExt<TBl, Error = sp_blockchain::Error>,
TBl: BlockT<Hash = <Blake2Hasher as Hasher>::Out>,
TRtApi: 'static + Send + Sync,
TCfg: Default,
+2 -2
View File
@@ -16,10 +16,10 @@
//! Errors that can occur during the service operation.
use client;
use network;
use keystore;
use consensus_common;
use sp_blockchain;
/// Service Result typedef.
pub type Result<T> = std::result::Result<T, Error>;
@@ -28,7 +28,7 @@ pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, derive_more::Display, derive_more::From)]
pub enum Error {
/// Client error.
Client(client::error::Error),
Client(sp_blockchain::Error),
/// IO error.
Io(std::io::Error),
/// Consensus error.