fix unhappy path
This commit is contained in:
parent
3c569e1278
commit
a94f9300fd
|
@ -40,6 +40,12 @@ impl Tally for NewViewTally {
|
|||
) -> Result<(Self::Qc, Self::Outcome), Self::TallyError> {
|
||||
let mut seen = HashSet::new();
|
||||
let mut outcome = HashSet::new();
|
||||
|
||||
// return early for leaf nodes
|
||||
if self.settings.threshold == 0 {
|
||||
return Ok(((), outcome));
|
||||
}
|
||||
|
||||
while let Some(vote) = vote_stream.next().await {
|
||||
// check vote view is valid
|
||||
if !vote.vote.view != timeout_qc.view {
|
||||
|
|
Loading…
Reference in New Issue