use std::sync::Arc; use async_trait::async_trait; use sp_consensus::{Error, CacheKeyId}; use sc_consensus::{BlockImportParams, BlockImport, Verifier}; use crate::{types::TendermintValidator, tendermint::TendermintImport}; #[async_trait] impl Verifier for TendermintImport where Arc: BlockImport, as BlockImport>::Error: Into, { 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)) } }