Skip to content

Commit

Permalink
remove attributes params, fix upgrade handler, add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpointer0x00 committed Apr 16, 2024
1 parent 9d44441 commit d4dc399
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1361,10 +1361,9 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypesv1.ParamKeyTable())
paramsKeeper.Subspace(crisistypes.ModuleName)

paramsKeeper.Subspace(markertypes.ModuleName) // TODO[1760]: params: Migrate marker params.
paramsKeeper.Subspace(nametypes.ModuleName) // TODO[1760]: params: Migrate name params.
paramsKeeper.Subspace(attributetypes.ModuleName) // TODO[1760]: params: Migrate attribute params.
paramsKeeper.Subspace(msgfeestypes.ModuleName) // TODO[1760]: params: Migrate msgFees params.
paramsKeeper.Subspace(markertypes.ModuleName) // TODO[1760]: params: Migrate marker params.
paramsKeeper.Subspace(nametypes.ModuleName) // TODO[1760]: params: Migrate name params.
paramsKeeper.Subspace(msgfeestypes.ModuleName) // TODO[1760]: params: Migrate msgFees params.
paramsKeeper.Subspace(wasmtypes.ModuleName)
paramsKeeper.Subspace(triggertypes.ModuleName) // TODO[1760]: params: Migrate trigger params.

Expand Down
2 changes: 1 addition & 1 deletion app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,6 @@ func migrateMetadataOSLocatorParams(ctx sdk.Context, app *App) {
if metadataParamSpace.Has(ctx, metadatatypes.ParamStoreKeyMaxValueLength) {
metadataParamSpace.Get(ctx, metadatatypes.ParamStoreKeyMaxValueLength, &maxValueLength)
}
app.AttributeKeeper.SetParams(ctx, attributetypes.Params{MaxValueLength: uint32(maxValueLength)})
app.MetadataKeeper.SetOSLocatorParams(ctx, metadatatypes.OSLocatorParams{MaxUriLength: uint32(maxValueLength)})
ctx.Logger().Info("Done migrating metadata os locator params.")
}
2 changes: 1 addition & 1 deletion app/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func (s *UpgradeTestSuite) TestUmber() {
"INF Migrating attribute params.",
"INF Done migrating attribute params.",
"INF Migrating metadata os locator params.",
"INF Done migrating metadata os locatorparams.",
"INF Done migrating metadata os locator params.",
"INF Starting module migrations. This may take a significant amount of time to complete. Do not restart node.",
"INF Updating IBC AllowedClients.",
"INF Done updating IBC AllowedClients.",
Expand Down

0 comments on commit d4dc399

Please sign in to comment.