mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 20:31:13 +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:
@@ -20,7 +20,7 @@ use crate::error::Error;
|
||||
use codec::Encode;
|
||||
use futures::{future, prelude::*};
|
||||
use sc_client_api::{BlockBackend, UsageProvider};
|
||||
use sp_consensus::import_queue::ImportQueue;
|
||||
use sc_consensus::import_queue::ImportQueue;
|
||||
use sp_runtime::{generic::BlockId, traits::Block as BlockT};
|
||||
|
||||
use crate::chain_ops::import_blocks;
|
||||
|
||||
@@ -19,21 +19,21 @@
|
||||
use crate::{error, error::Error};
|
||||
use codec::{Decode, IoReader as CodecIoReader};
|
||||
use futures::{future, prelude::*};
|
||||
use futures_timer::Delay;
|
||||
use log::{info, warn};
|
||||
use sc_chain_spec::ChainSpec;
|
||||
use sp_consensus::{
|
||||
import_queue::{BlockImportError, BlockImportResult, ImportQueue, IncomingBlock, Link},
|
||||
BlockOrigin,
|
||||
use sc_client_api::UsageProvider;
|
||||
use sc_consensus::import_queue::{
|
||||
BlockImportError, BlockImportStatus, ImportQueue, IncomingBlock, Link,
|
||||
};
|
||||
use serde_json::{de::IoRead as JsonIoRead, Deserializer, StreamDeserializer};
|
||||
use sp_consensus::BlockOrigin;
|
||||
use sp_runtime::{
|
||||
generic::SignedBlock,
|
||||
traits::{Block as BlockT, Header, MaybeSerializeDeserialize, NumberFor, Zero},
|
||||
traits::{
|
||||
Block as BlockT, CheckedDiv, Header, MaybeSerializeDeserialize, NumberFor, Saturating, Zero,
|
||||
},
|
||||
};
|
||||
|
||||
use futures_timer::Delay;
|
||||
use sc_client_api::UsageProvider;
|
||||
use serde_json::{de::IoRead as JsonIoRead, Deserializer, StreamDeserializer};
|
||||
use sp_runtime::traits::{CheckedDiv, Saturating};
|
||||
use std::{
|
||||
convert::{TryFrom, TryInto},
|
||||
io::{Read, Seek},
|
||||
@@ -316,7 +316,7 @@ where
|
||||
&mut self,
|
||||
imported: usize,
|
||||
_num_expected_blocks: usize,
|
||||
results: Vec<(Result<BlockImportResult<NumberFor<B>>, BlockImportError>, B::Hash)>,
|
||||
results: Vec<(Result<BlockImportStatus<NumberFor<B>>, BlockImportError>, B::Hash)>,
|
||||
) {
|
||||
self.imported_blocks += imported as u64;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user