From be3dd2c2509499afd75d552eb77386931032fc81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Thu, 15 Feb 2024 17:30:54 +0000 Subject: [PATCH] setting threshold value upon entering dealing exchange --- common/cosmwasm-smart-contracts/coconut-dkg/src/types.rs | 4 ++++ .../src/epoch_state/transactions/advance_epoch_state.rs | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/common/cosmwasm-smart-contracts/coconut-dkg/src/types.rs b/common/cosmwasm-smart-contracts/coconut-dkg/src/types.rs index bd0f1d4e1a..a4d0afb077 100644 --- a/common/cosmwasm-smart-contracts/coconut-dkg/src/types.rs +++ b/common/cosmwasm-smart-contracts/coconut-dkg/src/types.rs @@ -270,4 +270,8 @@ impl EpochState { pub fn is_in_progress(&self) -> bool { matches!(self, EpochState::InProgress) } + + pub fn is_dealing_exchange(&self) -> bool { + matches!(self, EpochState::DealingExchange { .. }) + } } diff --git a/contracts/coconut-dkg/src/epoch_state/transactions/advance_epoch_state.rs b/contracts/coconut-dkg/src/epoch_state/transactions/advance_epoch_state.rs index 715a6e5656..57681ed3cf 100644 --- a/contracts/coconut-dkg/src/epoch_state/transactions/advance_epoch_state.rs +++ b/contracts/coconut-dkg/src/epoch_state/transactions/advance_epoch_state.rs @@ -54,6 +54,15 @@ pub fn try_advance_epoch_state(deps: DepsMut<'_>, env: Env) -> Result