diff --git a/consensus/src/units/mod.rs b/consensus/src/units/mod.rs index d08ad22e..371d74c2 100644 --- a/consensus/src/units/mod.rs +++ b/consensus/src/units/mod.rs @@ -70,11 +70,8 @@ impl ControlHash { /// Calculate parent control hash, which includes all parent hashes into account. pub(crate) fn combine_hashes(parent_map: &NodeMap<(H::Hash, Round)>) -> H::Hash { - // TODO test without excluding rounds - let mut parents_hashes = NodeMap::with_size(parent_map.size()); - for (parent_index, &(hash, _)) in parent_map.iter() { - parents_hashes.insert(parent_index, hash); - } + // we include parent rounds with calculating hash but this is okay - we cannot + // have two units with the same hash but different rounds parent_map.using_encoded(H::hash) }