Skip to content

Commit

Permalink
fix: rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 committed Nov 27, 2023
1 parent 64ec7a9 commit 782e748
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion types/stake.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type ValidatorSet interface {
ValidatorByConsAddr(Context, ConsAddress) Validator // get a particular validator by consensus address
ValidatorByVoteAddr(Context, []byte) Validator // get a particular validator by vote address
TotalPower(Context) Dec // total power of the validator set
GetAnyStatusVotingPower(ctx Context) Dec // total voting power of the validator set
GetAllStatusVotingPower(ctx Context) Dec // total voting power of the validator set

// slash the validator and delegators of the validator, specifying offence height, offence power, and slash fraction
Slash(Context, ConsAddress, int64, int64, Dec)
Expand Down
2 changes: 1 addition & 1 deletion x/gov/handler_sidechain.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func handleMsgSideChainSubmitProposal(ctx sdk.Context, keeper Keeper, msg MsgSid
return ErrInvalidSideChainId(keeper.codespace, msg.SideChainId).Result()
}
if sdk.IsUpgrade(sdk.BCFusionFirstHardFork) {
vp := keeper.vs.GetSideChainVotingPower(ctx)
vp := keeper.vs.GetAllStatusVotingPower(ctx)
if vp.LTE(sdk.NewDecFromInt(sdk.BCFusionStopGovThreshold)) {
return sdk.ErrMsgNotSupported("").Result()
}
Expand Down
2 changes: 1 addition & 1 deletion x/stake/keeper/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (k Keeper) GetValidatorBySideConsAddr(ctx sdk.Context, sideConsAddr []byte)
return k.GetValidator(ctx, opAddr)
}

func (k Keeper) GetAnyStatusVotingPower(ctx sdk.Context) sdk.Dec {
func (k Keeper) GetAllStatusVotingPower(ctx sdk.Context) sdk.Dec {
store := ctx.KVStore(k.storeKey)
iterator := sdk.KVStorePrefixIterator(store, ValidatorsByConsAddrKey)
defer iterator.Close()
Expand Down

0 comments on commit 782e748

Please sign in to comment.