Skip to content

Commit

Permalink
fix(upgrades): perform no-op if 'from' and 'to' migration version are…
Browse files Browse the repository at this point in the history
… equal (#12174) (#12192)
  • Loading branch information
mergify[bot] committed Jun 8, 2022
1 parent 95d873f commit 48c2f77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/module/configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ func (c configurator) RegisterMigration(moduleName string, forVersion uint64, ha
// runModuleMigrations runs all in-place store migrations for one given module from a
// version to another version.
func (c configurator) runModuleMigrations(ctx sdk.Context, moduleName string, fromVersion, toVersion uint64) error {
// No-op if toVersion is the initial version.
if toVersion <= 1 {
// No-op if toVersion is the initial version or if the version is unchanged.
if toVersion <= 1 || fromVersion == toVersion {
return nil
}

Expand Down

0 comments on commit 48c2f77

Please sign in to comment.