diff --git a/src/crdt.rs b/src/crdt.rs index 3765f3a8dc500c..7d15d59f33a867 100644 --- a/src/crdt.rs +++ b/src/crdt.rs @@ -295,10 +295,10 @@ impl Crdt { // max number of nodes that we could be converged to pub fn convergence(&self) -> u64 { - let min = self.remote + let max = self.remote.values().len() as u64 + 1; + self.remote .values() - .fold(std::u64::MAX, |a, b| std::cmp::min(a, *b)); - std::cmp::min(min, self.remote.values().len() as u64 + 1) + .fold(max, |a, b| std::cmp::min(a, *b)) } fn random() -> u64 {