diff --git a/consensus/src/dag/reconstruction/mod.rs b/consensus/src/dag/reconstruction/mod.rs index 24d0fbb5..927df2f7 100644 --- a/consensus/src/dag/reconstruction/mod.rs +++ b/consensus/src/dag/reconstruction/mod.rs @@ -96,7 +96,8 @@ impl UnitWithParents for ReconstructedUnit { fn parent_for(&self, index: NodeIndex) -> Option<&HashFor> { self.parents.get(index).map(|(hash, _)| hash) } - + + #[cfg(test)] fn parent_round(&self, index: NodeIndex) -> Option { self.parents.get(index).map(|(_, round)| *round) } diff --git a/consensus/src/units/mod.rs b/consensus/src/units/mod.rs index 6bf807f1..9e7b4cbc 100644 --- a/consensus/src/units/mod.rs +++ b/consensus/src/units/mod.rs @@ -226,6 +226,7 @@ pub trait UnitWithParents: Unit { fn direct_parents(&self) -> impl Iterator>; fn parent_for(&self, index: NodeIndex) -> Option<&HashFor>; + #[cfg(test)] fn parent_round(&self, index: NodeIndex) -> Option; fn node_count(&self) -> NodeCount; }