mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Move client consensus parts out of primitives and into client/consensus/api (#9319)
* moved client code out of primitives * bump ci * Fixup from merge. * Removed unused deps thanks to review feedback * Removing unneeded deps * updating lock file * note about rustfmt * fixed typo to bump ci * Move lonely CacheKeyId to parent * cargo fmt * updating import style * Update docs/STYLE_GUIDE.md Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
@@ -19,10 +19,9 @@
|
||||
|
||||
use codec::alloc::collections::hash_map::HashMap;
|
||||
use sc_client_api::{backend::Finalizer, client::BlockBackend};
|
||||
use sc_consensus::{BlockImport, BlockImportParams, ForkChoiceStrategy};
|
||||
use sc_service::client::Client;
|
||||
use sp_consensus::{
|
||||
BlockImport, BlockImportParams, BlockOrigin, Error as ConsensusError, ForkChoiceStrategy,
|
||||
};
|
||||
use sp_consensus::{BlockOrigin, Error as ConsensusError};
|
||||
use sp_runtime::{generic::BlockId, traits::Block as BlockT, Justification, Justifications};
|
||||
|
||||
/// Extension trait for a test client.
|
||||
|
||||
@@ -52,6 +52,7 @@ serde = { version = "1.0.126", optional = true, features = ["derive"] }
|
||||
[dev-dependencies]
|
||||
sc-block-builder = { version = "0.10.0-dev", path = "../../client/block-builder" }
|
||||
sc-executor = { version = "0.10.0-dev", path = "../../client/executor" }
|
||||
sp-consensus = { version = "0.10.0-dev", path = "../../primitives/consensus/common" }
|
||||
substrate-test-runtime-client = { version = "2.0.0", path = "./client" }
|
||||
futures = "0.3.9"
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
sc-light = { version = "4.0.0-dev", path = "../../../client/light" }
|
||||
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
|
||||
sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/common" }
|
||||
sc-block-builder = { version = "0.10.0-dev", path = "../../../client/block-builder" }
|
||||
substrate-test-client = { version = "2.0.0", path = "../../client" }
|
||||
sp-core = { version = "4.0.0-dev", path = "../../../primitives/core" }
|
||||
@@ -23,6 +24,5 @@ sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
|
||||
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
|
||||
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||
sc-client-api = { version = "4.0.0-dev", path = "../../../client/api" }
|
||||
sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/common" }
|
||||
sc-service = { version = "0.10.0-dev", default-features = false, path = "../../../client/service" }
|
||||
futures = "0.3.9"
|
||||
|
||||
@@ -1244,12 +1244,12 @@ mod tests {
|
||||
use codec::Encode;
|
||||
use sc_block_builder::BlockBuilderProvider;
|
||||
use sp_api::ProvideRuntimeApi;
|
||||
use sp_consensus::BlockOrigin;
|
||||
use sp_core::storage::well_known_keys::HEAP_PAGES;
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_state_machine::ExecutionStrategy;
|
||||
use substrate_test_runtime_client::{
|
||||
prelude::*, runtime::TestAPI, sp_consensus::BlockOrigin, DefaultTestClientBuilderExt,
|
||||
TestClientBuilder,
|
||||
prelude::*, runtime::TestAPI, DefaultTestClientBuilderExt, TestClientBuilder,
|
||||
};
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -227,10 +227,11 @@
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
use sc_consensus::BlockImport;
|
||||
use sc_executor::NativeExecutionDispatch;
|
||||
use sc_service::TFullClient;
|
||||
use sp_api::{ConstructRuntimeApi, TransactionFor};
|
||||
use sp_consensus::{BlockImport, SelectChain};
|
||||
use sp_consensus::SelectChain;
|
||||
use sp_inherents::InherentDataProvider;
|
||||
use sp_runtime::traits::{Block as BlockT, SignedExtension};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user