Skip to content

Commit

Permalink
missed some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
cylewitruk committed Feb 7, 2025
1 parent e0db3d6 commit 5c0c1e0
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions signer/src/dkg/verification.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
//! This module contains logic specific to the distributed key generation (DKG)
//! protocol.
// TODO: Remove once non-test code uses this stuff.
#![allow(dead_code)]
//! This module contains logic specific to the verification of DKG shares.
use std::{
collections::HashMap,
Expand Down Expand Up @@ -243,15 +239,6 @@ where
.count() as u32
}

/// Gets the number of pending messages of the given type that are currently
/// stored in this [`StateMachine`].
fn pending_message_count(&self, message_type: WstsNetMessageType) -> u32 {
self.wsts_messages
.iter()
.filter(|((msg_type, _), msg)| *msg_type == message_type && !msg.processed)
.count() as u32
}

/// Gets the number of signers that are expected to participate in the DKG
/// verification.
fn signer_count(&self) -> u32 {
Expand Down Expand Up @@ -411,6 +398,15 @@ mod tests {
where
TError: From<Error> + std::error::Error + 'static + Send + Sync,
{
/// Gets the number of pending messages of the given type that are currently
/// stored in this [`StateMachine`].
fn pending_message_count(&self, message_type: WstsNetMessageType) -> u32 {
self.wsts_messages
.iter()
.filter(|((msg_type, _), msg)| *msg_type == message_type && !msg.processed)
.count() as u32
}

fn assert_message_counts(
&self,
message_type: WstsNetMessageType,
Expand Down

0 comments on commit 5c0c1e0

Please sign in to comment.