From 91879da1ba087ff212109990756f856dc62405f0 Mon Sep 17 00:00:00 2001 From: Shanin Roman Date: Tue, 6 Aug 2024 18:07:23 +0700 Subject: [PATCH] fix(sumeragi): keep voting block if wrong message is received Signed-off-by: Shanin Roman --- core/src/sumeragi/main_loop.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/sumeragi/main_loop.rs b/core/src/sumeragi/main_loop.rs index f5f9c0a6e2..d01a845a85 100644 --- a/core/src/sumeragi/main_loop.rs +++ b/core/src/sumeragi/main_loop.rs @@ -680,6 +680,7 @@ impl Sumeragi { ?actual_hash, "Block hash mismatch" ); + *voting_block = Some(voted_block); } else if let Err(err) = voted_block.block.add_signature(signature, &self.topology) { @@ -689,6 +690,7 @@ impl Sumeragi { ?err, "Signature not valid" ); + *voting_block = Some(voted_block); } else { *voting_block = self.try_commit_block(voted_block, is_genesis_peer);