use async_trait::async_trait;
use mithril_common::{crypto_helper::ProtocolInitializer, entities::Epoch, StdResult};
#[cfg_attr(test, mockall::automock)]
#[async_trait]
pub trait ProtocolInitializerStorer: Sync + Send {
async fn save_protocol_initializer(
&self,
epoch: Epoch,
protocol_initializer: ProtocolInitializer,
) -> StdResult<Option<ProtocolInitializer>>;
async fn get_protocol_initializer(
&self,
epoch: Epoch,
) -> StdResult<Option<ProtocolInitializer>>;
async fn get_last_protocol_initializer(
&self,
last: usize,
) -> StdResult<Vec<(Epoch, ProtocolInitializer)>>;
}