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
@@ -21,11 +21,8 @@ use codec::Encode;
use futures::sync::mpsc;
use parking_lot::RwLockWriteGuard;
use client_api::{
backend::Backend, blockchain,
CallExecutor, blockchain::HeaderBackend, well_known_cache_keys,
utils::is_descendent_of,
};
use sp_blockchain::{HeaderBackend, BlockStatus, well_known_cache_keys};
use client_api::{backend::Backend, CallExecutor, utils::is_descendent_of};
use client::Client;
use consensus_common::{
BlockImport, Error as ConsensusError,
@@ -403,8 +400,8 @@ impl<B, E, Block: BlockT<Hash=H256>, RA, SC> BlockImport<Block>
// early exit if block already in chain, otherwise the check for
// authority changes will error when trying to re-import a change block
match self.inner.status(BlockId::Hash(hash)) {
Ok(blockchain::BlockStatus::InChain) => return Ok(ImportResult::AlreadyInChain),
Ok(blockchain::BlockStatus::Unknown) => {},
Ok(BlockStatus::InChain) => return Ok(ImportResult::AlreadyInChain),
Ok(BlockStatus::Unknown) => {},
Err(e) => return Err(ConsensusError::ClientImport(e.to_string()).into()),
}