use async_trait::async_trait; use sp_inherents::CreateInherentDataProviders; use sp_runtime::traits::Block; use sp_blockchain::HeaderBackend; use sp_api::{TransactionFor, ProvideRuntimeApi}; use sp_consensus::{CacheKeyId, Environment}; use sc_consensus::{BlockImportParams, Verifier, BlockImport}; use sc_client_api::{Backend, Finalizer}; use crate::{tendermint::TendermintImport, Announce}; #[async_trait] impl< B: Block, Be: Backend + 'static, C: Send + Sync + HeaderBackend + Finalizer + ProvideRuntimeApi + 'static, I: Send + Sync + BlockImport> + 'static, CIDP: CreateInherentDataProviders + 'static, E: Send + Sync + Environment + 'static, A: Announce, > Verifier for TendermintImport where TransactionFor: Send + Sync + 'static, { async fn verify( &mut self, mut block: BlockImportParams, ) -> Result<(BlockImportParams, Option)>>), String> { self.check(&mut block).await.map_err(|e| format!("{}", e))?; Ok((block, None)) } }