Skip to content

Commit

Permalink
Fixed bug introduced in last commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoffranca committed Nov 1, 2024
1 parent 00f6214 commit 14d29b9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions node/actors/bft/src/chonky_bft/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,14 @@ impl StateMachine {
// timeout again. Note though that the underlying network implementation
// needs to keep retrying messages until they are delivered. Otherwise
// the consensus can halt!
if recv.is_err() && self.phase != validator::Phase::Timeout {
self.start_timeout(ctx).await?;
let Some(req) = recv.ok() else {
if self.phase != validator::Phase::Timeout {
self.start_timeout(ctx).await?;
}
continue;
}
};

// Process the message.
let req = recv.unwrap();
let now = ctx.now();
let label = match &req.msg.msg {
ConsensusMsg::LeaderProposal(_) => {
Expand Down

0 comments on commit 14d29b9

Please sign in to comment.