From 888049a00fef2404e84ea47810fd905940445a3d Mon Sep 17 00:00:00 2001 From: Marcin Date: Fri, 3 Jan 2025 09:39:05 +0100 Subject: [PATCH] fmt --- consensus/src/dag/reconstruction/dag.rs | 2 +- consensus/src/dag/reconstruction/mod.rs | 7 +------ consensus/src/dag/reconstruction/parents.rs | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/consensus/src/dag/reconstruction/dag.rs b/consensus/src/dag/reconstruction/dag.rs index 66460da9..6c16aaa3 100644 --- a/consensus/src/dag/reconstruction/dag.rs +++ b/consensus/src/dag/reconstruction/dag.rs @@ -121,8 +121,8 @@ mod test { Hasher, NodeCount, NodeIndex, NodeMap, }; use aleph_bft_mock::Hasher64; - use std::collections::HashSet; use aleph_bft_types::Round; + use std::collections::HashSet; fn full_parents_to_map( parents: Vec<::Hash>, diff --git a/consensus/src/dag/reconstruction/mod.rs b/consensus/src/dag/reconstruction/mod.rs index 809fb7fe..17aabd40 100644 --- a/consensus/src/dag/reconstruction/mod.rs +++ b/consensus/src/dag/reconstruction/mod.rs @@ -25,12 +25,7 @@ impl ReconstructedUnit { match unit.control_hash().combined_hash == ControlHash::::combine_hashes(&parents) { - true => { - Ok(ReconstructedUnit { - unit, - parents, - }) - } + true => Ok(ReconstructedUnit { unit, parents }), false => Err(unit), } } diff --git a/consensus/src/dag/reconstruction/parents.rs b/consensus/src/dag/reconstruction/parents.rs index c77e5fd1..84e4d972 100644 --- a/consensus/src/dag/reconstruction/parents.rs +++ b/consensus/src/dag/reconstruction/parents.rs @@ -3,8 +3,8 @@ use crate::{ units::{ControlHash, HashFor, Unit, UnitCoord}, NodeIndex, NodeMap, }; -use std::collections::{hash_map::Entry, HashMap}; use aleph_bft_types::Round; +use std::collections::{hash_map::Entry, HashMap}; /// A unit in the process of reconstructing its parents. #[derive(Debug, PartialEq, Eq, Clone)]