Skip to content

Commit

Permalink
migration fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
xmariachi committed Feb 19, 2025
1 parent 58d697a commit 66d443b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion x/emissions/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4002,7 +4002,7 @@ func mockUninitializedParams() types.Params {
GlobalReputerWhitelistEnabled: true,
GlobalAdminWhitelistAppended: true,
MaxWhitelistInputArrayLength: uint64(10),
MinWeightThresholdForStdnorm: alloraMath.ZeroDec(),
MinWeightThresholdForStdnorm: alloraMath.MustNewDecFromString("0.000001"),
}
}

Expand Down
1 change: 1 addition & 0 deletions x/emissions/keeper/msgserver/msg_server_params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ func (s *MsgServerTestSuite) TestUpdateAllParams() {
require.Equal(newParams.GlobalReputerWhitelistEnabled[0], updatedParams.GlobalReputerWhitelistEnabled)
require.Equal(newParams.GlobalAdminWhitelistAppended[0], updatedParams.GlobalAdminWhitelistAppended)
require.Equal(newParams.MaxWhitelistInputArrayLength[0], updatedParams.MaxWhitelistInputArrayLength)
require.Equal(newParams.MinWeightThresholdForStdnorm[0], updatedParams.MinWeightThresholdForStdnorm)
}

func (s *MsgServerTestSuite) TestUpdateParamsNonWhitelistedUser() {
Expand Down
1 change: 1 addition & 0 deletions x/emissions/migrations/v7/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func MigrateParams(ctx sdk.Context, store storetypes.KVStore, cdc codec.BinaryCo
GlobalReputerWhitelistEnabled: defaultParams.GlobalReputerWhitelistEnabled,
GlobalAdminWhitelistAppended: defaultParams.GlobalAdminWhitelistAppended,
MaxWhitelistInputArrayLength: defaultParams.MaxWhitelistInputArrayLength,
MinWeightThresholdForStdnorm: defaultParams.MinWeightThresholdForStdnorm,
}

ctx.Logger().Info(fmt.Sprintf("MIGRATED PARAMS: %+v", newParams))
Expand Down
1 change: 1 addition & 0 deletions x/emissions/migrations/v7/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,5 @@ func (s *EmissionsV6MigrationTestSuite) TestMigrateParams() {
s.Require().True(paramsExpected.GlobalReputerWhitelistEnabled)
s.Require().True(paramsExpected.GlobalAdminWhitelistAppended)
s.Require().Equal(paramsExpected.MaxWhitelistInputArrayLength, params.MaxWhitelistInputArrayLength)
s.Require().Equal(paramsExpected.MinWeightThresholdForStdnorm, params.MinWeightThresholdForStdnorm)
}

0 comments on commit 66d443b

Please sign in to comment.