From 66fa34f0189873adba8ee3c7f164c489ec74efb1 Mon Sep 17 00:00:00 2001 From: lklimek <842586+lklimek@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:32:55 +0100 Subject: [PATCH] refactor(config)!: remove deprecated config fields (#755) --- config/config.go | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/config/config.go b/config/config.go index 353641228..57bf89542 100644 --- a/config/config.go +++ b/config/config.go @@ -1068,20 +1068,6 @@ type ConsensusConfig struct { // If it is set to true, the consensus engine will proceed to the next height // as soon as the node has gathered votes from all of the validators on the network. UnsafeBypassCommitTimeoutOverride *bool `mapstructure:"unsafe-bypass-commit-timeout-override"` - - // Deprecated timeout parameters. These parameters are present in this struct - // so that they can be parsed so that validation can check if they have erroneously - // been included and provide a helpful error message. - // These fields should be completely removed in v0.37. - // See: https://github.com/tendermint/tendermint/issues/8188 - DeprecatedTimeoutPropose *interface{} `mapstructure:"timeout-propose"` - DeprecatedTimeoutProposeDelta *interface{} `mapstructure:"timeout-propose-delta"` - DeprecatedTimeoutPrevote *interface{} `mapstructure:"timeout-prevote"` - DeprecatedTimeoutPrevoteDelta *interface{} `mapstructure:"timeout-prevote-delta"` - DeprecatedTimeoutPrecommit *interface{} `mapstructure:"timeout-precommit"` - DeprecatedTimeoutPrecommitDelta *interface{} `mapstructure:"timeout-precommit-delta"` - DeprecatedTimeoutCommit *interface{} `mapstructure:"timeout-commit"` - DeprecatedSkipTimeoutCommit *interface{} `mapstructure:"skip-timeout-commit"` } // DefaultConsensusConfig returns a default configuration for the consensus service @@ -1160,30 +1146,7 @@ func (cfg *ConsensusConfig) ValidateBasic() error { func (cfg *ConsensusConfig) DeprecatedFieldWarning() error { var fields []string - if cfg.DeprecatedSkipTimeoutCommit != nil { - fields = append(fields, "skip-timeout-commit") - } - if cfg.DeprecatedTimeoutPropose != nil { - fields = append(fields, "timeout-propose") - } - if cfg.DeprecatedTimeoutProposeDelta != nil { - fields = append(fields, "timeout-propose-delta") - } - if cfg.DeprecatedTimeoutPrevote != nil { - fields = append(fields, "timeout-prevote") - } - if cfg.DeprecatedTimeoutPrevoteDelta != nil { - fields = append(fields, "timeout-prevote-delta") - } - if cfg.DeprecatedTimeoutPrecommit != nil { - fields = append(fields, "timeout-precommit") - } - if cfg.DeprecatedTimeoutPrecommitDelta != nil { - fields = append(fields, "timeout-precommit-delta") - } - if cfg.DeprecatedTimeoutCommit != nil { - fields = append(fields, "timeout-commit") - } + if cfg.DeprecatedQuorumType != 0 { fields = append(fields, "quorum-type") }