Skip to content

Commit

Permalink
add another halt height for rebels
Browse files Browse the repository at this point in the history
  • Loading branch information
nghuyenthevinh2000 committed Sep 23, 2023
1 parent 4e17c9c commit e67f307
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/forks.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package app

import (
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"
)

// BeginBlockForks is intended to be ran in a chain upgrade.
func BeginBlockForks(ctx sdk.Context, app *TerraApp) {
for _, fork := range Forks {
if ctx.BlockHeight() == fork.UpgradeHeight {
ctx.Logger().Info(fmt.Sprintf("applying fork %s at height %d", fork.UpgradeName, fork.UpgradeHeight))

fork.BeginForkLogic(ctx, app.AppKeepers, app.mm)
return
}
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/forks/forks.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func runForkLogicVersionMapEnable(ctx sdk.Context, keppers *keepers.AppKeepers,
}

func forkLogicFixMinCommission(ctx sdk.Context, keepers *keepers.AppKeepers, mm *module.Manager) {
MinCommissionRate := sdk.NewDecWithPrec(5, 2)
MinCommissionRate := sdk.NewDecWithPrec(5, 2) // 5%

space, exist := keepers.ParamsKeeper.GetSubspace(stakingtypes.StoreKey)
if !exist {
Expand Down
2 changes: 1 addition & 1 deletion types/fork/fork.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ const (
VersionMapEnableHeight = int64(11_543_150)
// Revert Min Commission slip during v2.2.0 upgrade
FixMinCommissionHeight = int64(14_665_190)
FixMinCommissionHeightRebel = int64(16_275_000)
FixMinCommissionHeightRebel = int64(16_300_000)
)

0 comments on commit e67f307

Please sign in to comment.