diff --git a/simlib/mixnet-sims/src/node/mix/mod.rs b/simlib/mixnet-sims/src/node/mix/mod.rs index 241d3e5..0530772 100644 --- a/simlib/mixnet-sims/src/node/mix/mod.rs +++ b/simlib/mixnet-sims/src/node/mix/mod.rs @@ -1,6 +1,6 @@ -pub mod consensus_streams; -pub mod lottery; -pub mod scheduler; +mod consensus_streams; +mod lottery; +mod scheduler; pub mod state; pub mod stream_wrapper; @@ -163,7 +163,6 @@ impl MixNode { settings, state: MixnodeState { node_id: id, - mock_counter: 0, step_id: 0, num_messages_broadcasted: 0, }, @@ -262,14 +261,13 @@ impl Node for MixNode { } self.state.step_id += 1; - self.state.mock_counter += 1; } fn analyze(&self, ward: &mut WardCondition) -> bool { match ward { - WardCondition::Max(condition) => self.state.mock_counter >= condition.max_count, + WardCondition::Max(_) => false, WardCondition::Sum(condition) => { - *condition.step_result.borrow_mut() += self.state.mock_counter; + *condition.step_result.borrow_mut() += self.state.num_messages_broadcasted; false } } diff --git a/simlib/mixnet-sims/src/node/mix/state.rs b/simlib/mixnet-sims/src/node/mix/state.rs index c1d57f2..644b011 100644 --- a/simlib/mixnet-sims/src/node/mix/state.rs +++ b/simlib/mixnet-sims/src/node/mix/state.rs @@ -12,7 +12,6 @@ use netrunner::{ #[derive(Debug, Clone, Serialize)] pub struct MixnodeState { pub node_id: NodeId, - pub mock_counter: usize, pub step_id: usize, pub num_messages_broadcasted: usize, }