Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move version map register to begin block #44

Merged
merged 3 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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