Skip to content

Commit

Permalink
Height 28153 Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Otto V authored and oten91 committed Jan 10, 2022
1 parent a0b6ed0 commit 8f72921
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

const (
AppVersion = "RC-0.7.0.1"
AppVersion = "RC-0.7.1"
)

// NewPocketCoreApp is a constructor function for PocketCoreApp
Expand Down
3 changes: 3 additions & 0 deletions doc/releases/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog
=======
## RC-0.7.1
- Fix for sync from scratch issue @ height 28153

## RC-0.7.0
- Enabled Validator/Servicer split on future upgrade height.
- Modified upgrade behaviour to allow upcoming upgrades.
Expand Down
9 changes: 7 additions & 2 deletions x/gov/keeper/subspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"github.com/pokt-network/pocket-core/x/gov/types"
)

const maxValidatorChangeAllowedHeight = 40000

// Allocate subspace used for keepers
func (k Keeper) Subspace(s string) sdk.Subspace {
_, ok := k.spaces[s]
Expand Down Expand Up @@ -175,8 +177,11 @@ func (k Keeper) ModifyParam(ctx sdk.Ctx, aclKey string, paramValue []byte, owner
if err := k.VerifyACL(ctx, aclKey, owner); err != nil {
return err.Result()
}
if !k.cdc.IsAfterSecondUpgrade(ctx.BlockHeight()) && aclKey == "pos/MaxValidators" {
return types.ErrUnauthorizedHeightParamChange(types.ModuleName, codec.UpgradeHeight, aclKey).Result()

if ctx.BlockHeight() >= maxValidatorChangeAllowedHeight {
if !k.cdc.IsAfterSecondUpgrade(ctx.BlockHeight()) && aclKey == "pos/MaxValidators" {
return types.ErrUnauthorizedHeightParamChange(types.ModuleName, codec.UpgradeHeight, aclKey).Result()
}
}

subspaceName, paramKey := types.SplitACLKey(aclKey)
Expand Down

0 comments on commit 8f72921

Please sign in to comment.