From 2e4ec9a5861011cb0e55c56e489fe3e07571ca08 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 30 May 2024 21:44:43 +0200 Subject: [PATCH] test: Slot genesis and add --- consensus/cryptarchia-engine/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/consensus/cryptarchia-engine/src/lib.rs b/consensus/cryptarchia-engine/src/lib.rs index 5c7b1e8e..cffe98f2 100644 --- a/consensus/cryptarchia-engine/src/lib.rs +++ b/consensus/cryptarchia-engine/src/lib.rs @@ -220,7 +220,7 @@ where #[cfg(test)] pub mod tests { - use super::Cryptarchia; + use super::{Cryptarchia, Slot}; use crate::Config; use std::hash::{DefaultHasher, Hash, Hasher}; @@ -356,5 +356,9 @@ pub mod tests { branch1.expect("length is set").length(), branch2.expect("length is set").length() ); + + let slot = Slot::genesis(); + + assert_eq!(slot + 10u64, Slot::from(10)); } }