Skip to content

Commit

Permalink
chore: backwards-compat removal of ConsensusParams.Timeout.Commit and…
Browse files Browse the repository at this point in the history
… ConsensusParams.Timeout.BypassCommitTimeout
  • Loading branch information
lklimek committed Mar 8, 2024
1 parent 04d6d15 commit 15aa522
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"crypto/sha256"
"errors"
"fmt"
"os"
"time"

"github.com/dashpay/tenderdash/crypto/bls12381"
Expand Down Expand Up @@ -90,6 +91,11 @@ type TimeoutParams struct {
ProposeDelta time.Duration `json:"propose_delta,string"`
Vote time.Duration `json:"vote,string"`
VoteDelta time.Duration `json:"vote_delta,string"`

// Unused, TODO: Remove in 0.15
Commit time.Duration `json:"commit,string"`
// Unused, TODO: Remove in 0.15
BypassCommitTimeout bool `json:"bypass_commit_timeout"`
}

// ABCIParams configure ABCI functionality specific to the Application Blockchain
Expand Down Expand Up @@ -309,6 +315,15 @@ func (params ConsensusParams) ValidateConsensusParams() error {
return errors.New("len(Validator.PubKeyTypes) must be greater than 0")
}

// TODO: Remove in v0.15
if params.Timeout.Commit != 0 {
fmt.Fprintln(os.Stderr, "WARNING: ConsensusParams.Timeout.Commit is not used and will be removed in v0.15")
}
// TODO: Remove in v0.15
if params.Timeout.BypassCommitTimeout {
fmt.Fprintln(os.Stderr, "WARNING: ConsensusParams.Timeout.BypassCommitTimeout is not used and will be removed in v0.15")
}

// Check if keyType is a known ABCIPubKeyType
for i := 0; i < len(params.Validator.PubKeyTypes); i++ {
keyType := params.Validator.PubKeyTypes[i]
Expand Down

0 comments on commit 15aa522

Please sign in to comment.