diff --git a/common/cosmwasm-smart-contracts/coconut-dkg/src/types.rs b/common/cosmwasm-smart-contracts/coconut-dkg/src/types.rs index d06df5ca3b..5cf5fd780e 100644 --- a/common/cosmwasm-smart-contracts/coconut-dkg/src/types.rs +++ b/common/cosmwasm-smart-contracts/coconut-dkg/src/types.rs @@ -241,23 +241,28 @@ impl Epoch { // // Note: It's important that the variant ordering is not changed otherwise it would mess up the derived `PartialOrd` #[cw_serde] -#[derive(Copy)] +#[derive(Copy, Default)] pub enum EpochState { + #[default] WaitingInitialisation, - PublicKeySubmission { resharing: bool }, - DealingExchange { resharing: bool }, - VerificationKeySubmission { resharing: bool }, - VerificationKeyValidation { resharing: bool }, - VerificationKeyFinalization { resharing: bool }, + PublicKeySubmission { + resharing: bool, + }, + DealingExchange { + resharing: bool, + }, + VerificationKeySubmission { + resharing: bool, + }, + VerificationKeyValidation { + resharing: bool, + }, + VerificationKeyFinalization { + resharing: bool, + }, InProgress, } -impl Default for EpochState { - fn default() -> Self { - Self::WaitingInitialisation - } -} - impl Display for EpochState { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { match self {