From 79116276be23bdaf72d17e9beed62427d64d63dc Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Wed, 29 Jun 2022 14:38:58 +0100 Subject: [PATCH 1/3] updates --- x/mint/types/params.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/mint/types/params.go b/x/mint/types/params.go index 56c9b8aa783b..4789a10cd20c 100644 --- a/x/mint/types/params.go +++ b/x/mint/types/params.go @@ -169,7 +169,7 @@ func validateGoalBonded(i interface{}) error { return fmt.Errorf("invalid parameter type: %T", i) } - if v.IsNegative() { + if v.IsNegative() || v.IsZero() { return fmt.Errorf("goal bonded cannot be negative: %s", v) } if v.GT(sdk.OneDec()) { From 77cdd2c6c08eda7f73a58f5e87608b691da50c8a Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Wed, 29 Jun 2022 14:42:55 +0100 Subject: [PATCH 2/3] updates --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a00bc152d2a6..a5d4ab03257d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes +* (x/mint) [#12384](https://github.com/cosmos/cosmos-sdk/pull/12384) Ensure `GoalBonded` must be positive when performing `x/mint` parameter validation. * (x/auth) [#12261](https://github.com/cosmos/cosmos-sdk/pull/12261) Deprecate pagination in GetTxsEventRequest/Response in favor of page and limit to align with tendermint `SignClient.TxSearch` * (vesting) [#12190](https://github.com/cosmos/cosmos-sdk/pull/12190) Replace https://github.com/cosmos/cosmos-sdk/pull/12190 to use `NewBaseAccountWithAddress` in all vesting account message handlers. * (linting) [#12135](https://github.com/cosmos/cosmos-sdk/pull/12135) Fix variable naming issues per enabled linters. Run gofumpt to ensure easy reviews of ongoing linting work. From 61f6600fe5dd057070fd43f413c5363bf7e18fb9 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Wed, 29 Jun 2022 14:43:33 +0100 Subject: [PATCH 3/3] updates --- x/mint/types/params.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/mint/types/params.go b/x/mint/types/params.go index 4789a10cd20c..69a909af05bc 100644 --- a/x/mint/types/params.go +++ b/x/mint/types/params.go @@ -170,7 +170,7 @@ func validateGoalBonded(i interface{}) error { } if v.IsNegative() || v.IsZero() { - return fmt.Errorf("goal bonded cannot be negative: %s", v) + return fmt.Errorf("goal bonded must be positive: %s", v) } if v.GT(sdk.OneDec()) { return fmt.Errorf("goal bonded too large: %s", v)