Skip to content

Commit 0fd2cad

Browse files
committed
Revert "Set finalized_view to None when restoring in the Commit step"
This reverts commit 59e9ebd.
1 parent 59e9ebd commit 0fd2cad

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

core/src/consensus/tendermint/worker.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,11 +1033,6 @@ impl Worker {
10331033
let client = self.client();
10341034
let backup = restore(client.get_kvdb().as_ref());
10351035
if let Some(backup) = backup {
1036-
if backup.step == Step::Commit {
1037-
self.finalized_view_of_current_block = None;
1038-
} else {
1039-
self.finalized_view_of_current_block = backup.finalized_view_of_current_block;
1040-
}
10411036
let backup_step = match backup.step {
10421037
Step::Propose => TendermintState::Propose,
10431038
Step::Prevote => TendermintState::Prevote,
@@ -1051,6 +1046,7 @@ impl Worker {
10511046
self.height = backup.height;
10521047
self.view = backup.view;
10531048
self.finalized_view_of_previous_block = backup.finalized_view_of_previous_block;
1049+
self.finalized_view_of_current_block = backup.finalized_view_of_current_block;
10541050

10551051
if let Some(proposal) = backup.proposal {
10561052
if client.block(&BlockId::Hash(proposal)).is_some() {

0 commit comments

Comments
 (0)