diff --git a/node-data/src/ledger/header.rs b/node-data/src/ledger/header.rs index 0a036ea74..53c4a0c4c 100644 --- a/node-data/src/ledger/header.rs +++ b/node-data/src/ledger/header.rs @@ -7,7 +7,7 @@ use serde::Serialize; use super::*; -use crate::message::{ConsensusHeader, MESSAGE_MAX_ITER}; +use crate::message::ConsensusHeader; pub type Seed = Signature; #[derive(Eq, PartialEq, Clone, Serialize)] @@ -154,14 +154,6 @@ impl Header { let gas_limit = Self::read_u64_le(r)?; let iteration = Self::read_u8(r)?; - // Iteration is 0-based - if iteration >= MESSAGE_MAX_ITER { - return Err(io::Error::new( - io::ErrorKind::InvalidData, - format!("Invalid iteration {iteration})"), - )); - } - let prev_block_cert = Attestation::read(r)?; let failed_iterations = IterationsInfo::read(r)?; diff --git a/node-data/src/message.rs b/node-data/src/message.rs index 528ca65ca..30f662ccc 100644 --- a/node-data/src/message.rs +++ b/node-data/src/message.rs @@ -28,9 +28,6 @@ use crate::{bls, ledger, Serializable, StepName}; pub const TOPIC_FIELD_POS: usize = 1 + 2 + 2; pub const PROTOCOL_VERSION: Version = Version(1, 0, 2); -/// Max value for iteration. -pub const MESSAGE_MAX_ITER: u8 = 50; - /// Block version pub const BLOCK_HEADER_VERSION: u8 = 1; @@ -370,14 +367,6 @@ impl Serializable for ConsensusHeader { let round = Self::read_u64_le(r)?; let iteration = Self::read_u8(r)?; - // Iteration is 0-based - if iteration >= MESSAGE_MAX_ITER { - return Err(io::Error::new( - io::ErrorKind::InvalidData, - format!("Invalid iteration {iteration})"), - )); - } - Ok(ConsensusHeader { prev_block_hash, round,