Skip to content

Commit

Permalink
refactor: remove EpochSettingsMessageUntilV0_1_32 public visibility…
Browse files Browse the repository at this point in the history
… and remove useless comments
  • Loading branch information
dlachaume committed Oct 29, 2024
1 parent d140b97 commit 8f42843
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions mithril-common/src/messages/epoch_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,64 +114,37 @@ mod tests {
// Supported structure until OpenAPI version 0.1.28.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
struct EpochSettingsMessageUntilV0_1_28 {
/// Current Epoch
pub epoch: Epoch,

/// Current Protocol parameters
#[serde(rename = "protocol")]
pub protocol_parameters: ProtocolParameters,

/// Next Protocol parameters
#[serde(rename = "next_protocol")]
pub next_protocol_parameters: ProtocolParameters,
}

// Supported structure until OpenAPI version 0.1.29.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
struct EpochSettingsMessageUntilV0_1_29 {
/// Current Epoch
pub epoch: Epoch,

/// Current Protocol parameters
#[serde(rename = "protocol")]
pub protocol_parameters: ProtocolParameters,

/// Next Protocol parameters
#[serde(rename = "next_protocol")]
pub next_protocol_parameters: ProtocolParameters,

/// Current Signers
pub current_signers: Vec<SignerMessagePart>,

/// Signers that will be able to sign on the next epoch
pub next_signers: Vec<SignerMessagePart>,
}

// Supported structure until OpenAPI version 0.1.32.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct EpochSettingsMessageUntilV0_1_32 {
/// Current Epoch
struct EpochSettingsMessageUntilV0_1_32 {
pub epoch: Epoch,

/// Current Protocol parameters
#[serde(rename = "protocol")]
pub protocol_parameters: ProtocolParameters,

/// Next Protocol parameters
#[serde(rename = "next_protocol")]
pub next_protocol_parameters: ProtocolParameters,

/// Current Signers
pub current_signers: Vec<SignerMessagePart>,

/// Signers that will be able to sign on the next epoch
pub next_signers: Vec<SignerMessagePart>,

/// Cardano transactions signing configuration for the current epoch
#[serde(skip_serializing_if = "Option::is_none")]
pub cardano_transactions_signing_config: Option<CardanoTransactionsSigningConfig>,

/// Cardano transactions signing configuration for the next epoch
#[serde(skip_serializing_if = "Option::is_none")]
pub next_cardano_transactions_signing_config: Option<CardanoTransactionsSigningConfig>,
}
Expand Down

0 comments on commit 8f42843

Please sign in to comment.