mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 10:01:17 +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:
@@ -50,7 +50,7 @@ fn build_test_full_node(network_config: config::NetworkConfiguration)
|
||||
struct PassThroughVerifier(bool);
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl<B: BlockT> sp_consensus::import_queue::Verifier<B> for PassThroughVerifier {
|
||||
impl<B: BlockT> sc_consensus::Verifier<B> for PassThroughVerifier {
|
||||
async fn verify(
|
||||
&mut self,
|
||||
origin: sp_consensus::BlockOrigin,
|
||||
@@ -59,7 +59,7 @@ fn build_test_full_node(network_config: config::NetworkConfiguration)
|
||||
body: Option<Vec<B::Extrinsic>>,
|
||||
) -> Result<
|
||||
(
|
||||
sp_consensus::BlockImportParams<B, ()>,
|
||||
sc_consensus::BlockImportParams<B, ()>,
|
||||
Option<Vec<(sp_blockchain::well_known_cache_keys::Id, Vec<u8>)>>,
|
||||
),
|
||||
String,
|
||||
@@ -79,16 +79,16 @@ fn build_test_full_node(network_config: config::NetworkConfiguration)
|
||||
)]
|
||||
});
|
||||
|
||||
let mut import = sp_consensus::BlockImportParams::new(origin, header);
|
||||
let mut import = sc_consensus::BlockImportParams::new(origin, header);
|
||||
import.body = body;
|
||||
import.finalized = self.0;
|
||||
import.justifications = justifications;
|
||||
import.fork_choice = Some(sp_consensus::ForkChoiceStrategy::LongestChain);
|
||||
import.fork_choice = Some(sc_consensus::ForkChoiceStrategy::LongestChain);
|
||||
Ok((import, maybe_keys))
|
||||
}
|
||||
}
|
||||
|
||||
let import_queue = Box::new(sp_consensus::import_queue::BasicQueue::new(
|
||||
let import_queue = Box::new(sc_consensus::BasicQueue::new(
|
||||
PassThroughVerifier(false),
|
||||
Box::new(client.clone()),
|
||||
None,
|
||||
|
||||
Reference in New Issue
Block a user