Skip to content

Commit

Permalink
Mark method which is used in tests only
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin-Radecki committed Jan 13, 2025
1 parent 8078477 commit 3c8af55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion consensus/src/dag/reconstruction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ impl<U: Unit> UnitWithParents for ReconstructedUnit<U> {
fn parent_for(&self, index: NodeIndex) -> Option<&HashFor<Self>> {
self.parents.get(index).map(|(hash, _)| hash)
}


#[cfg(test)]
fn parent_round(&self, index: NodeIndex) -> Option<Round> {
self.parents.get(index).map(|(_, round)| *round)
}
Expand Down
1 change: 1 addition & 0 deletions consensus/src/units/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ pub trait UnitWithParents: Unit {
fn direct_parents(&self) -> impl Iterator<Item = &HashFor<Self>>;
fn parent_for(&self, index: NodeIndex) -> Option<&HashFor<Self>>;

#[cfg(test)]
fn parent_round(&self, index: NodeIndex) -> Option<Round>;
fn node_count(&self) -> NodeCount;
}
Expand Down

0 comments on commit 3c8af55

Please sign in to comment.