Fix endless loop on mocktally
This commit is contained in:
parent
818d7f29cd
commit
780276497f
@ -66,11 +66,10 @@ impl Tally for MockTally {
|
||||
return Err(Error("Invalid vote".into()));
|
||||
}
|
||||
count_votes += 1;
|
||||
if count_votes > self.threshold {
|
||||
return Ok(MockQc { count_votes });
|
||||
}
|
||||
}
|
||||
if count_votes > self.threshold {
|
||||
Ok(MockQc { count_votes })
|
||||
} else {
|
||||
Err(Error("Not enough votes".into()))
|
||||
}
|
||||
Err(Error("Not enough votes".into()))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user