use hashgraph_like_consensus::{
events::ConsensusEventBus, scope::ConsensusScope, service::ConsensusService,
signing::ConsensusSignatureScheme, storage::ConsensusStorage,
};
pub trait ConsensusPlugin: 'static {
type Scope: ConsensusScope + From<String> + 'static;
type ConsensusStorage: ConsensusStorage<Self::Scope> + 'static;
type EventBus: ConsensusEventBus<Self::Scope> + 'static;
type Signer: ConsensusSignatureScheme + Clone + 'static;
fn new_storage() -> Self::ConsensusStorage;
fn new_event_bus() -> Self::EventBus;
}
pub type PluginConsensus<P> = ConsensusService<
<P as ConsensusPlugin>::Scope,
<P as ConsensusPlugin>::ConsensusStorage,
<P as ConsensusPlugin>::EventBus,
<P as ConsensusPlugin>::Signer,
>;