From 6061ba3f3dc995d79ee2daeb7c80dca1018fe641 Mon Sep 17 00:00:00 2001 From: Youngjoon Lee Date: Tue, 20 Jun 2023 00:09:33 +0900 Subject: [PATCH] fix: prevent skipping one view when proposing a block in unhappy path (#199) --- nomos-services/consensus/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nomos-services/consensus/src/lib.rs b/nomos-services/consensus/src/lib.rs index 666e7d6d..86fc9793 100644 --- a/nomos-services/consensus/src/lib.rs +++ b/nomos-services/consensus/src/lib.rs @@ -434,10 +434,10 @@ where participating_nodes: carnot.root_committee(), }; 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() { 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( adapter, leader_committee, @@ -448,7 +448,7 @@ where Event::ProposeBlock { qc: Qc::Aggregated(AggregateQc { high_qc, - view: next_view, + view: new_view, }), } });