mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 23:57:56 +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:
@@ -43,19 +43,23 @@ mod worker;
|
||||
|
||||
pub use crate::worker::{MiningBuild, MiningMetadata, MiningWorker};
|
||||
|
||||
use crate::worker::UntilImportedOrTimeout;
|
||||
use codec::{Decode, Encode};
|
||||
use futures::{Future, StreamExt};
|
||||
use log::*;
|
||||
use parking_lot::Mutex;
|
||||
use prometheus_endpoint::Registry;
|
||||
use sc_client_api::{self, backend::AuxStore, BlockOf, BlockchainEvents};
|
||||
use sc_consensus::{
|
||||
BasicQueue, BlockCheckParams, BlockImport, BlockImportParams, BoxBlockImport,
|
||||
BoxJustificationImport, ForkChoiceStrategy, ImportResult, Verifier,
|
||||
};
|
||||
use sp_api::ProvideRuntimeApi;
|
||||
use sp_block_builder::BlockBuilder as BlockBuilderApi;
|
||||
use sp_blockchain::{well_known_cache_keys::Id as CacheKeyId, HeaderBackend, ProvideCache};
|
||||
use sp_consensus::{
|
||||
import_queue::{BasicQueue, BoxBlockImport, BoxJustificationImport, Verifier},
|
||||
BlockCheckParams, BlockImport, BlockImportParams, BlockOrigin, CanAuthorWith, Environment,
|
||||
Error as ConsensusError, ForkChoiceStrategy, ImportResult, Proposer, SelectChain, SyncOracle,
|
||||
BlockOrigin, CanAuthorWith, Environment, Error as ConsensusError, Proposer, SelectChain,
|
||||
SyncOracle,
|
||||
};
|
||||
use sp_consensus_pow::{Seal, TotalDifficulty, POW_ENGINE_ID};
|
||||
use sp_inherents::{CreateInherentDataProviders, InherentDataProvider};
|
||||
@@ -69,8 +73,6 @@ use std::{
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use crate::worker::UntilImportedOrTimeout;
|
||||
|
||||
#[derive(derive_more::Display, Debug)]
|
||||
pub enum Error<B: BlockT> {
|
||||
#[display(fmt = "Header uses the wrong engine {:?}", _0)]
|
||||
@@ -540,7 +542,7 @@ where
|
||||
E::Error: std::fmt::Debug,
|
||||
E::Proposer: Proposer<Block, Transaction = sp_api::TransactionFor<C, Block>>,
|
||||
SO: SyncOracle + Clone + Send + Sync + 'static,
|
||||
L: sp_consensus::JustificationSyncLink<Block>,
|
||||
L: sc_consensus::JustificationSyncLink<Block>,
|
||||
CIDP: CreateInherentDataProviders<Block, ()>,
|
||||
CAW: CanAuthorWith<Block> + Clone + Send + 'static,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user