Skip to content

Commit

Permalink
Mint module: keep proto folder version and module consensus version i…
Browse files Browse the repository at this point in the history
…n lock-step
  • Loading branch information
relyt29 committed Dec 4, 2024
1 parent b54896e commit 11e8d2f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion x/mint/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

// ConsensusVersion defines the current x/mint module consensus version.
const ConsensusVersion = 3
const ConsensusVersion = 4

var (
_ module.AppModuleBasic = AppModule{} //nolint:exhaustruct
Expand Down Expand Up @@ -125,6 +125,13 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
if err != nil {
panic(fmt.Sprintf("failed to migrate x/%s from version 2 to 3: %v", types.ModuleName, err))
}
err = cfg.RegisterMigration(types.ModuleName, 3, func(ctx sdk.Context) error {
ctx.Logger().Info(fmt.Sprintf("MIGRATING %s MODULE FROM VERSION 3 TO VERSION 4", types.ModuleName))
return nil
})
if err != nil {
panic(fmt.Sprintf("failed to migrate x/%s from version 3 to 4: %v", types.ModuleName, err))
}
}

// InitGenesis performs genesis initialization for the mint module. It returns
Expand Down

0 comments on commit 11e8d2f

Please sign in to comment.