cleanup
This commit is contained in:
@ -298,10 +298,10 @@ impl Crdt {
|
|||||||
|
|
||||||
// max number of nodes that we could be converged to
|
// max number of nodes that we could be converged to
|
||||||
pub fn convergence(&self) -> u64 {
|
pub fn convergence(&self) -> u64 {
|
||||||
let min = self.remote
|
let max = self.remote.values().len() as u64 + 1;
|
||||||
|
self.remote
|
||||||
.values()
|
.values()
|
||||||
.fold(std::u64::MAX, |a, b| std::cmp::min(a, *b));
|
.fold(max, |a, b| std::cmp::min(a, *b))
|
||||||
std::cmp::min(min, self.remote.values().len() as u64 + 1)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn random() -> u64 {
|
fn random() -> u64 {
|
||||||
|
Reference in New Issue
Block a user