mithril_signer/store/
protocol_initializer_store.rs1use async_trait::async_trait;
2
3use mithril_common::{crypto_helper::ProtocolInitializer, entities::Epoch, StdResult};
4
5#[cfg_attr(test, mockall::automock)]
6#[async_trait]
7pub trait ProtocolInitializerStorer: Sync + Send {
10 async fn save_protocol_initializer(
12 &self,
13 epoch: Epoch,
14 protocol_initializer: ProtocolInitializer,
15 ) -> StdResult<Option<ProtocolInitializer>>;
16
17 async fn get_protocol_initializer(
19 &self,
20 epoch: Epoch,
21 ) -> StdResult<Option<ProtocolInitializer>>;
22
23 async fn get_last_protocol_initializer(
25 &self,
26 last: usize,
27 ) -> StdResult<Vec<(Epoch, ProtocolInitializer)>>;
28}