use mithril_common::entities::{
CardanoTransactionsSigningConfig, Epoch, ProtocolParameters, Signer,
};
#[derive(Clone, Debug, PartialEq)]
pub struct SignerEpochSettings {
pub epoch: Epoch,
pub registration_protocol_parameters: ProtocolParameters,
pub current_signers: Vec<Signer>,
pub next_signers: Vec<Signer>,
pub cardano_transactions_signing_config: Option<CardanoTransactionsSigningConfig>,
pub next_cardano_transactions_signing_config: Option<CardanoTransactionsSigningConfig>,
}
impl SignerEpochSettings {
#[cfg(test)]
pub fn dummy() -> SignerEpochSettings {
use mithril_common::test_utils::fake_data;
let beacon = fake_data::beacon();
let registration_protocol_parameters = fake_data::protocol_parameters();
let signers = fake_data::signers(5);
let current_signers = signers[1..3].to_vec();
let next_signers = signers[2..5].to_vec();
let cardano_transactions_signing_config = Some(CardanoTransactionsSigningConfig::dummy());
let next_cardano_transactions_signing_config =
Some(CardanoTransactionsSigningConfig::dummy());
SignerEpochSettings {
epoch: beacon.epoch,
registration_protocol_parameters,
current_signers,
next_signers,
cardano_transactions_signing_config,
next_cardano_transactions_signing_config,
}
}
}