Skip to content

Commit d58bd3e

Browse files
committed
derive Clone for ValidatorStore's Error and required sub-errors
1 parent e8efbfc commit d58bd3e

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

consensus/types/src/attestation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use super::{
1616
SecretKey, Signature, SignedRoot,
1717
};
1818

19-
#[derive(Debug, PartialEq)]
19+
#[derive(Debug, PartialEq, Clone)]
2020
pub enum Error {
2121
SszTypesError(ssz_types::Error),
2222
AlreadySigned(usize),

validator_client/slashing_protection/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub const SLASHING_PROTECTION_FILENAME: &str = "slashing_protection.sqlite";
2727
/// The attestation or block is not safe to sign.
2828
///
2929
/// This could be because it's slashable, or because an error occurred.
30-
#[derive(PartialEq, Debug)]
30+
#[derive(PartialEq, Debug, Clone)]
3131
pub enum NotSafe {
3232
UnregisteredValidator(PublicKeyBytes),
3333
DisabledValidator(PublicKeyBytes),

validator_client/slashing_protection/src/signed_attestation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub struct SignedAttestation {
1010
}
1111

1212
/// Reasons why an attestation may be slashable (or invalid).
13-
#[derive(PartialEq, Debug)]
13+
#[derive(PartialEq, Debug, Clone)]
1414
pub enum InvalidAttestation {
1515
/// The attestation has the same target epoch as an attestation from the DB (enclosed).
1616
DoubleVote(SignedAttestation),

validator_client/slashing_protection/src/signed_block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub struct SignedBlock {
99
}
1010

1111
/// Reasons why a block may be slashable.
12-
#[derive(PartialEq, Debug)]
12+
#[derive(PartialEq, Debug, Clone)]
1313
pub enum InvalidBlock {
1414
DoubleBlockProposal(SignedBlock),
1515
SlotViolatesLowerBound { block_slot: Slot, bound_slot: Slot },

validator_client/validator_store/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use types::{
1010
VoluntaryExit,
1111
};
1212

13-
#[derive(Debug, PartialEq)]
13+
#[derive(Debug, PartialEq, Clone)]
1414
pub enum Error<T> {
1515
DoppelgangerProtected(PublicKeyBytes),
1616
UnknownToDoppelgangerService(PublicKeyBytes),

0 commit comments

Comments
 (0)