use serde::{Deserialize, Serialize};
use crate::entities::{Epoch, ProtocolParameters, SignedEntityType, Signer};
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct CertificatePending {
pub epoch: Epoch,
#[serde(rename = "entity_type")]
pub signed_entity_type: SignedEntityType,
#[serde(rename = "protocol")]
pub protocol_parameters: ProtocolParameters,
#[serde(rename = "next_protocol")]
pub next_protocol_parameters: ProtocolParameters,
pub signers: Vec<Signer>,
pub next_signers: Vec<Signer>,
}
impl CertificatePending {
pub fn new(
epoch: Epoch,
signed_entity_type: SignedEntityType,
protocol_parameters: ProtocolParameters,
next_protocol_parameters: ProtocolParameters,
signers: Vec<Signer>,
next_signers: Vec<Signer>,
) -> CertificatePending {
CertificatePending {
epoch,
signed_entity_type,
protocol_parameters,
next_protocol_parameters,
signers,
next_signers,
}
}
}