Skip to content

Commit

Permalink
Merge pull request #44 from classic-terra/v1.0.5-vm-fix
Browse files Browse the repository at this point in the history
move version map register to begin block
  • Loading branch information
Tobias Andersen committed Jan 18, 2023
2 parents 7fe4468 + 6bf1a7e commit 8bb56e9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -11,7 +11,7 @@

# Build
bin
build
_build
vendor
.vendor-new
build
Expand Down
5 changes: 5 additions & 0 deletions app/app.go
Expand Up @@ -626,6 +626,11 @@ func (app *TerraApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) a
}
}

// trigger SetModuleVersionMap in upgrade keeper at the VersionMapEnableHeight
if ctx.BlockHeight() == core.VersionMapEnableHeight {
app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap())
}

return app.mm.BeginBlock(ctx, req)
}

Expand Down
1 change: 1 addition & 0 deletions types/alias.go
Expand Up @@ -40,6 +40,7 @@ const (
BombayChainID = "bombay-12"
SwapDisableForkHeight = fork.SwapDisableForkHeight
SwapEnableForkHeight = fork.SwapEnableForkHeight
VersionMapEnableHeight = fork.VersionMapEnableHeight
)

// functions aliases
Expand Down
2 changes: 2 additions & 0 deletions types/fork/height.go
Expand Up @@ -4,3 +4,5 @@ package fork
const SwapDisableForkHeight = 7607790
// SwapEnableForkHeight - renable IBC only, block height is approximately December 5th, 2022
const SwapEnableForkHeight = 10542500
// VersionMapEnableHeight - set the version map to enable software upgrades, approximately February 14, 2023
const VersionMapEnableHeight = 11543150

0 comments on commit 8bb56e9

Please sign in to comment.