Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Eq/PartialEq impls for Proposal and subfields #3862

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/core/component/governance/src/proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use penumbra_shielded_pool::params::ShieldedPoolParameters;
use penumbra_stake::params::StakeParameters;

/// A governance proposal.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[serde(try_from = "pb::Proposal", into = "pb::Proposal")]
pub struct Proposal {
/// The ID number of the proposal.
Expand Down Expand Up @@ -197,7 +197,7 @@ impl TryFrom<ProposalToml> for Proposal {
}

/// The specific kind of a proposal.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Eq, PartialEq)]
#[cfg_attr(feature = "clap", derive(clap::Subcommand))]
pub enum ProposalKind {
/// A signaling proposal.
Expand Down Expand Up @@ -254,7 +254,7 @@ impl Proposal {
}

/// The machine-interpretable body of a proposal.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum ProposalPayload {
/// A signaling proposal is merely for coordination; it does not enact anything automatically by
/// itself.
Expand Down Expand Up @@ -429,7 +429,7 @@ impl ProposalPayload {
///
/// Note: must be kept in sync with
/// `penumbra_app::params::AppParameters`.
#[derive(Clone, Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)]
#[serde(
try_from = "pb::ChangedAppParameters",
into = "pb::ChangedAppParameters"
Expand Down
Loading