Skip to content

Commit

Permalink
fix(x/gov): check right params (backport #19102) (#19104)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jan 18, 2024
1 parent 19d9d84 commit 60c6d9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x/gov/types/v1/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ func (p Params) ValidateBasic() error {
if err != nil {
return fmt.Errorf("invalid expedited threshold string: %w", err)
}
if !threshold.IsPositive() {
return fmt.Errorf("expedited vote threshold must be positive: %s", threshold)
if !expeditedThreshold.IsPositive() {
return fmt.Errorf("expedited vote threshold must be positive: %s", expeditedThreshold)
}
if threshold.GT(sdkmath.LegacyOneDec()) {
return fmt.Errorf("expedited vote threshold too large: %s", threshold)
if expeditedThreshold.GT(sdkmath.LegacyOneDec()) {
return fmt.Errorf("expedited vote threshold too large: %s", expeditedThreshold)
}
if expeditedThreshold.LTE(threshold) {
return fmt.Errorf("expedited vote threshold %s, must be greater than the regular threshold %s", expeditedThreshold, threshold)
Expand Down

0 comments on commit 60c6d9b

Please sign in to comment.