fix(upgrades): perform no-op if 'from' and 'to' migration version are equal (#12174)
This commit is contained in:
parent
2094c13ecd
commit
4e50756b55
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user