fix(x/gov): check right params (#19102)
This commit is contained in:
parent
2a95a4abdd
commit
0698a9fb3f
@ -162,11 +162,11 @@ func (p Params) ValidateBasic(addressCodec address.Codec) 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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user