Skip to content

Commit

Permalink
derive Clone for ValidatorStore's Error and required sub-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dknopik committed Jan 7, 2025
1 parent e0da923 commit 4510b73
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion consensus/types/src/attestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use super::{
Signature, SignedRoot,
};

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Clone)]
pub enum Error {
SszTypesError(ssz_types::Error),
AlreadySigned(usize),
Expand Down
2 changes: 1 addition & 1 deletion validator_client/slashing_protection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub const SLASHING_PROTECTION_FILENAME: &str = "slashing_protection.sqlite";
/// The attestation or block is not safe to sign.
///
/// This could be because it's slashable, or because an error occurred.
#[derive(PartialEq, Debug)]
#[derive(PartialEq, Debug, Clone)]
pub enum NotSafe {
UnregisteredValidator(PublicKeyBytes),
DisabledValidator(PublicKeyBytes),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub struct SignedAttestation {
}

/// Reasons why an attestation may be slashable (or invalid).
#[derive(PartialEq, Debug)]
#[derive(PartialEq, Debug, Clone)]
pub enum InvalidAttestation {
/// The attestation has the same target epoch as an attestation from the DB (enclosed).
DoubleVote(SignedAttestation),
Expand Down
2 changes: 1 addition & 1 deletion validator_client/slashing_protection/src/signed_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct SignedBlock {
}

/// Reasons why a block may be slashable.
#[derive(PartialEq, Debug)]
#[derive(PartialEq, Debug, Clone)]
pub enum InvalidBlock {
DoubleBlockProposal(SignedBlock),
SlotViolatesLowerBound { block_slot: Slot, bound_slot: Slot },
Expand Down
2 changes: 1 addition & 1 deletion validator_client/validator_store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use types::{
VoluntaryExit,
};

#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Clone)]
pub enum Error<T> {
DoppelgangerProtected(PublicKeyBytes),
UnknownToDoppelgangerService(PublicKeyBytes),
Expand Down

0 comments on commit 4510b73

Please sign in to comment.