mithril_aggregator/entities/
leader_aggregator_epoch_settings.rs1use mithril_common::entities::{
2 CardanoTransactionsSigningConfig, Epoch, ProtocolParameters, Signer,
3};
4
5#[derive(Clone, Debug, PartialEq)]
7pub struct LeaderAggregatorEpochSettings {
8 pub epoch: Epoch,
10
11 pub registration_protocol_parameters: ProtocolParameters,
13
14 pub current_signers: Vec<Signer>,
16
17 pub next_signers: Vec<Signer>,
19
20 pub cardano_transactions_signing_config: Option<CardanoTransactionsSigningConfig>,
22
23 pub next_cardano_transactions_signing_config: Option<CardanoTransactionsSigningConfig>,
25}
26
27impl LeaderAggregatorEpochSettings {
28 #[cfg(test)]
29 pub fn dummy() -> LeaderAggregatorEpochSettings {
31 use mithril_common::test_utils::fake_data;
32
33 let beacon = fake_data::beacon();
35
36 let registration_protocol_parameters = fake_data::protocol_parameters();
38
39 let signers = fake_data::signers(5);
41 let current_signers = signers[1..3].to_vec();
42 let next_signers = signers[2..5].to_vec();
43
44 let cardano_transactions_signing_config = Some(CardanoTransactionsSigningConfig::dummy());
46 let next_cardano_transactions_signing_config =
47 Some(CardanoTransactionsSigningConfig::dummy());
48
49 LeaderAggregatorEpochSettings {
51 epoch: beacon.epoch,
52 registration_protocol_parameters,
53 current_signers,
54 next_signers,
55 cardano_transactions_signing_config,
56 next_cardano_transactions_signing_config,
57 }
58 }
59}