Skip to content

Commit 8bb56e9

Browse files
author
Tobias Andersen
authored
Merge pull request #44 from classic-terra/v1.0.5-vm-fix
move version map register to begin block
2 parents 7fe4468 + 6bf1a7e commit 8bb56e9

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Build
1313
bin
14-
build
14+
_build
1515
vendor
1616
.vendor-new
1717
build

app/app.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,11 @@ func (app *TerraApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) a
626626
}
627627
}
628628

629+
// trigger SetModuleVersionMap in upgrade keeper at the VersionMapEnableHeight
630+
if ctx.BlockHeight() == core.VersionMapEnableHeight {
631+
app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap())
632+
}
633+
629634
return app.mm.BeginBlock(ctx, req)
630635
}
631636

types/alias.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const (
4040
BombayChainID = "bombay-12"
4141
SwapDisableForkHeight = fork.SwapDisableForkHeight
4242
SwapEnableForkHeight = fork.SwapEnableForkHeight
43+
VersionMapEnableHeight = fork.VersionMapEnableHeight
4344
)
4445

4546
// functions aliases

types/fork/height.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ package fork
44
const SwapDisableForkHeight = 7607790
55
// SwapEnableForkHeight - renable IBC only, block height is approximately December 5th, 2022
66
const SwapEnableForkHeight = 10542500
7+
// VersionMapEnableHeight - set the version map to enable software upgrades, approximately February 14, 2023
8+
const VersionMapEnableHeight = 11543150

0 commit comments

Comments
 (0)