Companion for Substrate#14612 (#2923)

* Companion for Substrate#14612

https://github.com/paritytech/substrate/pull/14612

* Remove patch

* Cargo.lock

* Fix

* Fix compilation

* Fix Fix

* ...

* :face_palm:

* .................

* update lockfile for {"polkadot", "substrate"}

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
Bastian Köcher
2023-08-17 14:39:09 +02:00
committed by GitHub
parent 061eee1382
commit 02691d94d8
20 changed files with 332 additions and 398 deletions
@@ -51,8 +51,8 @@ pub struct VerifyNothing;
impl<Block: BlockT> Verifier<Block> for VerifyNothing {
async fn verify(
&mut self,
params: BlockImportParams<Block, ()>,
) -> Result<BlockImportParams<Block, ()>, String> {
params: BlockImportParams<Block>,
) -> Result<BlockImportParams<Block>, String> {
Ok(params)
}
}
@@ -64,14 +64,13 @@ pub fn verify_nothing_import_queue<Block: BlockT, I>(
block_import: I,
spawner: &impl sp_core::traits::SpawnEssentialNamed,
registry: Option<&substrate_prometheus_endpoint::Registry>,
) -> BasicQueue<Block, I::Transaction>
) -> BasicQueue<Block>
where
I: BlockImport<Block, Error = ConsensusError>
+ ParachainBlockImportMarker
+ Send
+ Sync
+ 'static,
I::Transaction: Send,
{
BasicQueue::new(VerifyNothing, Box::new(block_import), None, spawner, registry)
}
+1 -2
View File
@@ -143,7 +143,6 @@ where
BE: Backend<Block>,
{
type Error = BI::Error;
type Transaction = BI::Transaction;
async fn check_block(
&mut self,
@@ -154,7 +153,7 @@ where
async fn import_block(
&mut self,
mut params: sc_consensus::BlockImportParams<Block, Self::Transaction>,
mut params: sc_consensus::BlockImportParams<Block>,
) -> Result<sc_consensus::ImportResult, Self::Error> {
// Blocks are stored within the backend by using POST hash.
let hash = params.post_hash();