mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-12 22:19:26 +00:00
Consolidate C and I generics into a TendermintClient trait alias
This commit is contained in:
@@ -1,29 +1,34 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
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_api::TransactionFor;
|
||||
|
||||
use sp_consensus::{CacheKeyId, Environment};
|
||||
use sc_consensus::{BlockImportParams, Verifier, BlockImport};
|
||||
use sp_consensus::{Error, CacheKeyId, Environment};
|
||||
use sc_consensus::{BlockImportParams, BlockImport, Verifier};
|
||||
|
||||
use sc_client_api::{Backend, Finalizer};
|
||||
use sc_client_api::Backend;
|
||||
|
||||
use crate::{tendermint::TendermintImport, Announce};
|
||||
use crate::{
|
||||
tendermint::{TendermintClient, TendermintImport},
|
||||
Announce,
|
||||
};
|
||||
|
||||
#[async_trait]
|
||||
impl<
|
||||
B: Block,
|
||||
Be: Backend<B> + 'static,
|
||||
C: Send + Sync + HeaderBackend<B> + Finalizer<B, Be> + ProvideRuntimeApi<B> + 'static,
|
||||
I: Send + Sync + BlockImport<B, Transaction = TransactionFor<C, B>> + 'static,
|
||||
C: TendermintClient<B, Be>,
|
||||
CIDP: CreateInherentDataProviders<B, ()> + 'static,
|
||||
E: Send + Sync + Environment<B> + 'static,
|
||||
A: Announce<B>,
|
||||
> Verifier<B> for TendermintImport<B, Be, C, I, CIDP, E, A>
|
||||
> Verifier<B> for TendermintImport<B, Be, C, CIDP, E, A>
|
||||
where
|
||||
TransactionFor<C, B>: Send + Sync + 'static,
|
||||
Arc<C>: BlockImport<B, Transaction = TransactionFor<C, B>>,
|
||||
<Arc<C> as BlockImport<B>>::Error: Into<Error>,
|
||||
{
|
||||
async fn verify(
|
||||
&mut self,
|
||||
|
||||
Reference in New Issue
Block a user