diff --git a/light-client-verifier/src/options.rs b/light-client-verifier/src/options.rs index 767627149..e1582af54 100644 --- a/light-client-verifier/src/options.rs +++ b/light-client-verifier/src/options.rs @@ -10,7 +10,7 @@ use serde::{Deserialize, Serialize}; use crate::types::TrustThreshold; /// Verification parameters -#[derive(Copy, Clone, Debug, PartialEq, Display, Serialize, Deserialize)] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Display, Serialize, Deserialize)] #[display(fmt = "{:?}", self)] pub struct Options { /// Defines what fraction of the total voting power of a known diff --git a/light-client-verifier/src/types.rs b/light-client-verifier/src/types.rs index 24df9c909..27779f12b 100644 --- a/light-client-verifier/src/types.rs +++ b/light-client-verifier/src/types.rs @@ -100,7 +100,7 @@ impl<'a> UntrustedBlockState<'a> { /// A light block is the core data structure used by the light client. /// It records everything the light client needs to know about a block. -#[derive(Clone, Debug, Display, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Display, PartialEq, Eq, Serialize, Deserialize)] #[display(fmt = "{:?}", self)] pub struct LightBlock { /// Header and commit of this block @@ -163,7 +163,7 @@ impl LightBlock { /// Contains the local status information, like the latest height, latest block and valset hashes, /// list of of connected full nodes (primary and witnesses). -#[derive(Clone, Debug, Display, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Display, PartialEq, Eq, Serialize, Deserialize)] #[display(fmt = "{:?}", self)] pub struct LatestStatus { /// The latest height we are trusting. diff --git a/light-client/tests/model_based.rs b/light-client/tests/model_based.rs index 5f320893a..757c9ed5e 100644 --- a/light-client/tests/model_based.rs +++ b/light-client/tests/model_based.rs @@ -35,14 +35,14 @@ mod mbt { } } - #[derive(Deserialize, Clone, Debug, PartialEq)] + #[derive(Deserialize, Clone, Debug, PartialEq, Eq)] pub enum LiteTestKind { SingleStep, Bisection, } /// An abstraction of the LightClient verification verdict - #[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] + #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] pub enum LiteVerdict { /// verified successfully #[serde(rename = "SUCCESS")] diff --git a/p2p/src/secret_connection/amino_types.rs b/p2p/src/secret_connection/amino_types.rs index 67bb33c40..31cceafe9 100644 --- a/p2p/src/secret_connection/amino_types.rs +++ b/p2p/src/secret_connection/amino_types.rs @@ -12,7 +12,7 @@ use crate::error::Error; const PUB_KEY_ED25519_AMINO_PREFIX: [u8; 5] = [0x16, 0x24, 0xde, 0x64, 0x20]; /// Authentication signature message -#[derive(Clone, PartialEq, Message)] +#[derive(Clone, PartialEq, Eq, Message)] pub struct AuthSigMessage { /// Public key #[prost(bytes, tag = "1")] diff --git a/rpc/src/endpoint/consensus_state.rs b/rpc/src/endpoint/consensus_state.rs index 95c51050a..42b426ab2 100644 --- a/rpc/src/endpoint/consensus_state.rs +++ b/rpc/src/endpoint/consensus_state.rs @@ -132,7 +132,7 @@ pub struct RoundVotes { } /// Details of a single vote from a particular consensus round. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum RoundVote { Nil, Vote(VoteSummary), @@ -166,7 +166,7 @@ impl<'de> Deserialize<'de> for RoundVote { } } -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct VoteSummary { pub validator_index: i32, pub validator_address_fingerprint: Fingerprint, @@ -307,7 +307,7 @@ impl fmt::Display for VoteSummary { } } -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct Fingerprint(Vec); impl FromStr for Fingerprint { diff --git a/rpc/src/endpoint/evidence.rs b/rpc/src/endpoint/evidence.rs index 9bc1b3378..9a5f46d9c 100644 --- a/rpc/src/endpoint/evidence.rs +++ b/rpc/src/endpoint/evidence.rs @@ -6,7 +6,7 @@ use tendermint::{abci::transaction, evidence::Evidence}; use crate::Method; /// `/broadcast_evidence`: broadcast an evidence. -#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] +#[derive(Clone, Debug, Deserialize, PartialEq, Eq, Serialize)] pub struct Request { /// Evidence to broadcast pub ev: Evidence, diff --git a/rpc/src/event.rs b/rpc/src/event.rs index 5fcb12d1d..2b2bc03bb 100644 --- a/rpc/src/event.rs +++ b/rpc/src/event.rs @@ -13,7 +13,7 @@ use crate::{prelude::*, query::EventType, response::Wrapper, Response}; /// An incoming event produced by a [`Subscription`]. /// /// [`Subscription`]: ../struct.Subscription.html -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] pub struct Event { /// The query that produced the event. pub query: String, @@ -40,7 +40,7 @@ impl Event { } } -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(tag = "type", content = "value")] // To be fixed in 0.24 #[allow(clippy::large_enum_variant)] @@ -60,7 +60,7 @@ pub enum EventData { } /// Transaction result info. -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] pub struct TxInfo { #[serde(with = "tendermint_proto::serializers::from_str")] pub height: i64, @@ -71,7 +71,7 @@ pub struct TxInfo { } /// Transaction result. -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] pub struct TxResult { pub log: Option, pub gas_wanted: Option, diff --git a/rpc/src/query.rs b/rpc/src/query.rs index 29040ccd2..50eee895d 100644 --- a/rpc/src/query.rs +++ b/rpc/src/query.rs @@ -394,7 +394,7 @@ where } /// The types of Tendermint events for which we can query at present. -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum EventType { NewBlock, Tx, diff --git a/tendermint/src/abci/responses.rs b/tendermint/src/abci/responses.rs index e0158f09e..c0f64fccc 100644 --- a/tendermint/src/abci/responses.rs +++ b/tendermint/src/abci/responses.rs @@ -77,7 +77,7 @@ pub struct DeliverTx { } /// Event -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct Event { /// Event type #[serde(rename = "type")] @@ -93,7 +93,7 @@ pub struct Event { /// /// // TODO(tarcieri): generate this automatically from the proto -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct BeginBlock { /// Tags #[serde(default)] @@ -106,7 +106,7 @@ pub struct BeginBlock { /// /// // TODO(tarcieri): generate this automatically from the proto -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct EndBlock { /// Validator updates #[serde(deserialize_with = "deserialize_validator_updates")] diff --git a/tendermint/src/abci/tag.rs b/tendermint/src/abci/tag.rs index 6986890f1..feb840675 100644 --- a/tendermint/src/abci/tag.rs +++ b/tendermint/src/abci/tag.rs @@ -8,7 +8,7 @@ use tendermint_proto::serializers::bytes::base64string; use crate::{error::Error, prelude::*}; /// Tags -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct Tag { /// Key pub key: Key, diff --git a/tendermint/src/abci/transaction.rs b/tendermint/src/abci/transaction.rs index bf8f0aa6b..38123a24f 100644 --- a/tendermint/src/abci/transaction.rs +++ b/tendermint/src/abci/transaction.rs @@ -72,7 +72,7 @@ impl Serialize for Transaction { /// transactions are arbitrary byte arrays. /// /// -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] #[serde(try_from = "RawData", into = "RawData")] pub struct Data { txs: Option>, diff --git a/tendermint/src/block.rs b/tendermint/src/block.rs index 2dc69e34a..5c29e8440 100644 --- a/tendermint/src/block.rs +++ b/tendermint/src/block.rs @@ -33,7 +33,7 @@ use crate::{abci::transaction, error::Error, evidence, prelude::*}; /// /// // Default serialization - all fields serialize; used by /block endpoint -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] #[non_exhaustive] pub struct Block { /// Block header diff --git a/tendermint/src/evidence.rs b/tendermint/src/evidence.rs index 082e584cd..f2dfa64e5 100644 --- a/tendermint/src/evidence.rs +++ b/tendermint/src/evidence.rs @@ -26,7 +26,7 @@ use crate::{ /// evidence: `DuplicateVoteEvidence`. /// /// -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] //#[serde(tag = "type", content = "value")] #[serde(try_from = "RawEvidence", into = "RawEvidence")] // Used by RPC /broadcast_evidence endpoint // To be fixed in 0.24 @@ -68,7 +68,7 @@ impl From for RawEvidence { } /// Duplicate vote evidence -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct DuplicateVoteEvidence { vote_a: Vote, vote_b: Vote, @@ -135,7 +135,7 @@ impl DuplicateVoteEvidence { /// Conflicting headers evidence. // Todo: This struct doesn't seem to have a protobuf definition. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct ConflictingHeadersEvidence { //#[serde(rename = "H1")] h1: SignedHeader, @@ -153,7 +153,7 @@ impl ConflictingHeadersEvidence { /// Evidence data is a wrapper for a list of `Evidence`. /// /// -#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] #[serde(try_from = "RawEvidenceList", into = "RawEvidenceList")] pub struct Data { evidence: Option>, diff --git a/tendermint/src/proposal.rs b/tendermint/src/proposal.rs index dd17daf1a..a5334529b 100644 --- a/tendermint/src/proposal.rs +++ b/tendermint/src/proposal.rs @@ -22,7 +22,7 @@ use crate::{ }; /// Proposal -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct Proposal { /// Proposal message type pub msg_type: Type, diff --git a/tendermint/src/proposal/canonical_proposal.rs b/tendermint/src/proposal/canonical_proposal.rs index f9755f814..d8346cadf 100644 --- a/tendermint/src/proposal/canonical_proposal.rs +++ b/tendermint/src/proposal/canonical_proposal.rs @@ -14,7 +14,7 @@ use crate::{ }; /// CanonicalProposal for signing -#[derive(Clone, PartialEq)] +#[derive(Clone, PartialEq, Eq)] pub struct CanonicalProposal { /// type alias for byte pub msg_type: Type, diff --git a/tendermint/src/proposal/sign_proposal.rs b/tendermint/src/proposal/sign_proposal.rs index 242291697..a78f8c813 100644 --- a/tendermint/src/proposal/sign_proposal.rs +++ b/tendermint/src/proposal/sign_proposal.rs @@ -13,7 +13,7 @@ use super::Proposal; use crate::{chain::Id as ChainId, error::Error, prelude::*}; /// SignProposalRequest is a request to sign a proposal -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct SignProposalRequest { /// Proposal pub proposal: Proposal, diff --git a/tendermint/src/public_key/pub_key_request.rs b/tendermint/src/public_key/pub_key_request.rs index d1c955dd1..a83a163db 100644 --- a/tendermint/src/public_key/pub_key_request.rs +++ b/tendermint/src/public_key/pub_key_request.rs @@ -5,7 +5,7 @@ use tendermint_proto::{privval::PubKeyRequest as RawPubKeyRequest, Protobuf}; use crate::{chain::Id as ChainId, prelude::*, Error}; /// PubKeyRequest requests the consensus public key from the remote signer. -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct PubKeyRequest { /// Chain ID pub chain_id: ChainId, diff --git a/tendermint/src/validator.rs b/tendermint/src/validator.rs index 57b1eba0f..ec5d6b428 100644 --- a/tendermint/src/validator.rs +++ b/tendermint/src/validator.rs @@ -319,7 +319,7 @@ impl ProposerPriority { } /// Updates to the validator set -#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct Update { /// Validator public key #[serde(deserialize_with = "deserialize_public_key")] diff --git a/tendermint/src/vote.rs b/tendermint/src/vote.rs index f89b1f9b7..829c41aff 100644 --- a/tendermint/src/vote.rs +++ b/tendermint/src/vote.rs @@ -27,7 +27,7 @@ use crate::{ /// include information about the validator signing it. /// /// -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] #[serde(try_from = "RawVote", into = "RawVote")] pub struct Vote { /// Type of vote (prevote or precommit) diff --git a/tendermint/src/vote/canonical_vote.rs b/tendermint/src/vote/canonical_vote.rs index 11aaa8caf..363129003 100644 --- a/tendermint/src/vote/canonical_vote.rs +++ b/tendermint/src/vote/canonical_vote.rs @@ -6,7 +6,7 @@ use tendermint_proto::{types::CanonicalVote as RawCanonicalVote, Protobuf}; use crate::{block, chain::Id as ChainId, error::Error, prelude::*, Time}; /// CanonicalVote is used for protobuf encoding a Vote -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] #[serde(try_from = "RawCanonicalVote", into = "RawCanonicalVote")] pub struct CanonicalVote { /// Type of vote (prevote or precommit) diff --git a/tendermint/src/vote/sign_vote.rs b/tendermint/src/vote/sign_vote.rs index dc43ef3bd..54caf1c87 100644 --- a/tendermint/src/vote/sign_vote.rs +++ b/tendermint/src/vote/sign_vote.rs @@ -12,7 +12,7 @@ use tendermint_proto::{ use crate::{chain, error::Error, prelude::*, Vote}; /// SignVoteRequest is a request to sign a vote -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, PartialEq, Eq, Debug)] pub struct SignVoteRequest { /// Vote pub vote: Vote, diff --git a/testgen/src/light_block.rs b/testgen/src/light_block.rs index e53cde708..c6cea5ab7 100644 --- a/testgen/src/light_block.rs +++ b/testgen/src/light_block.rs @@ -32,7 +32,7 @@ use crate::{ /// } /// } /// ``` -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct TmLightBlock { /// Header and commit of this block pub signed_header: SignedHeader,