fix: prevent skipping one view when proposing a block in unhappy path (#199)
This commit is contained in:
parent
2db493c753
commit
6061ba3f3d
|
@ -434,10 +434,10 @@ where
|
||||||
participating_nodes: carnot.root_committee(),
|
participating_nodes: carnot.root_committee(),
|
||||||
};
|
};
|
||||||
let (new_carnot, out) = carnot.approve_new_view(timeout_qc.clone(), new_views);
|
let (new_carnot, out) = carnot.approve_new_view(timeout_qc.clone(), new_views);
|
||||||
let next_view = timeout_qc.view + 2;
|
let new_view = timeout_qc.view + 1;
|
||||||
if carnot.is_next_leader() {
|
if carnot.is_next_leader() {
|
||||||
let high_qc = carnot.high_qc();
|
let high_qc = carnot.high_qc();
|
||||||
task_manager.push(timeout_qc.view + 1, async move {
|
task_manager.push(new_view, async move {
|
||||||
let _votes = Self::gather_new_views(
|
let _votes = Self::gather_new_views(
|
||||||
adapter,
|
adapter,
|
||||||
leader_committee,
|
leader_committee,
|
||||||
|
@ -448,7 +448,7 @@ where
|
||||||
Event::ProposeBlock {
|
Event::ProposeBlock {
|
||||||
qc: Qc::Aggregated(AggregateQc {
|
qc: Qc::Aggregated(AggregateQc {
|
||||||
high_qc,
|
high_qc,
|
||||||
view: next_view,
|
view: new_view,
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue