From 74f7b5c0599d129aabdd42dd6dd0a8dea9ff6217 Mon Sep 17 00:00:00 2001 From: Konstantin <355847+Frozen@users.noreply.github.com> Date: Wed, 3 Jul 2024 14:01:15 -0400 Subject: [PATCH] Removed unused parameter disableViewChange. (#4699) --- consensus/consensus.go | 2 -- consensus/view_change.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/consensus/consensus.go b/consensus/consensus.go index d9f96b94fa..a281a8ae7c 100644 --- a/consensus/consensus.go +++ b/consensus/consensus.go @@ -120,8 +120,6 @@ type Consensus struct { host p2p.Host // MessageSender takes are of sending consensus message and the corresponding retry logic. msgSender *MessageSender - // If true, this consensus will not propose view change. - disableViewChange bool // Have a dedicated reader thread pull from this chan, like in node SlashChan chan slash.Record // How long in second the leader needs to wait to propose a new block. diff --git a/consensus/view_change.go b/consensus/view_change.go index 5525e12266..a0ac6c0f79 100644 --- a/consensus/view_change.go +++ b/consensus/view_change.go @@ -231,7 +231,7 @@ func createTimeout() map[TimeoutType]*utils.Timeout { // startViewChange start the view change process func (consensus *Consensus) startViewChange() { - if consensus.disableViewChange || consensus.isBackup { + if consensus.isBackup { return }