fix tally_by condition (#234)
This commit is contained in:
parent
4a80690c1f
commit
224a3a53f5
|
@ -425,15 +425,15 @@ impl<L: UpdateableLeaderSelection, O: Overlay<LeaderSelection = L>> Node for Car
|
|||
timeout_qc,
|
||||
new_views,
|
||||
} => {
|
||||
let (new, out) = self.engine.approve_new_view(timeout_qc.clone(), new_views);
|
||||
output.push(Output::Send(out));
|
||||
self.engine = new;
|
||||
tracing::info!(
|
||||
node = parse_idx(&self.id),
|
||||
current_view = self.engine.current_view(),
|
||||
timeout_view = timeout_qc.view,
|
||||
"receive new view message"
|
||||
);
|
||||
let (new, out) = self.engine.approve_new_view(timeout_qc.clone(), new_views);
|
||||
output.push(Output::Send(out));
|
||||
self.engine = new;
|
||||
}
|
||||
Event::TimeoutQc { timeout_qc } => {
|
||||
tracing::info!(
|
||||
|
|
|
@ -28,7 +28,7 @@ impl<T: core::hash::Hash + Eq> Tally<T> {
|
|||
let entries = self.cache.entry(view).or_default();
|
||||
entries.insert(message);
|
||||
let entries = entries.len();
|
||||
if entries >= threshold {
|
||||
if entries == threshold {
|
||||
Some(self.cache.remove(&view).unwrap())
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Reference in New Issue