From 796f6d57c3a6896ddcf7f5bed840e590e0a2b66d Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Mon, 23 Oct 2023 17:48:42 +0200 Subject: [PATCH] Fix tests --- Code/common/src/consensus.rs | 2 +- Code/consensus/src/executor.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Code/common/src/consensus.rs b/Code/common/src/consensus.rs index 0615d3909..8f7a98d96 100644 --- a/Code/common/src/consensus.rs +++ b/Code/common/src/consensus.rs @@ -64,7 +64,7 @@ pub mod test { const DUMMY_ADDRESS: Address = Address::new(42); - const DUMMY_VALUE: Self::Value = Value::new(0xdeadbeef); + const DUMMY_VALUE: Self::Value = Value::new(9999); fn new_proposal(height: Height, round: Round, value: Value, pol_round: Round) -> Proposal { Proposal::new(height, round, value, pol_round) diff --git a/Code/consensus/src/executor.rs b/Code/consensus/src/executor.rs index 61358d275..2e8405bba 100644 --- a/Code/consensus/src/executor.rs +++ b/Code/consensus/src/executor.rs @@ -214,7 +214,7 @@ where #[cfg(test)] mod tests { use malachite_common::test::{ - Height, Proposal, PublicKey, TestConsensus, Validator, ValidatorSet, Value, Vote, + Height, Proposal, PublicKey, TestConsensus, Validator, ValidatorSet, Vote, }; use malachite_round::state::{RoundValue, State, Step}; @@ -222,7 +222,7 @@ mod tests { #[test] fn test_executor_steps() { - let value = Value::new(9999); // TODO: get value from external source + let value = TestConsensus::DUMMY_VALUE; // TODO: get value from external source let value_id = value.id(); let v1 = Validator::new(PublicKey::new(vec![1]), 1); let v2 = Validator::new(PublicKey::new(vec![2]), 1);