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)
  • Loading branch information
fedekunze authored Jun 8, 2022
1 parent 2094c13 commit 4e50756
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, fromVersion uint64, h
// 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 4e50756

Please sign in to comment.