diff --git a/base_layer/core/src/consensus/consensus_constants.rs b/base_layer/core/src/consensus/consensus_constants.rs index 09c3ffb61a..5a9791190e 100644 --- a/base_layer/core/src/consensus/consensus_constants.rs +++ b/base_layer/core/src/consensus/consensus_constants.rs @@ -362,6 +362,8 @@ impl ConsensusConstants { } pub fn epoch_length(&self) -> u64 { + #[cfg(any(test, debug_assertions))] + assert_ne!(self.vn_epoch_length, 0, "Epoch length must be greater than 0"); self.vn_epoch_length }