From 782e748390fa3cd7f97cbeecd819f6874368c706 Mon Sep 17 00:00:00 2001 From: j75689 Date: Mon, 27 Nov 2023 10:13:36 +0800 Subject: [PATCH] fix: rename function --- types/stake.go | 2 +- x/gov/handler_sidechain.go | 2 +- x/stake/keeper/validator.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/stake.go b/types/stake.go index 2424fdfde..7177a0a2c 100644 --- a/types/stake.go +++ b/types/stake.go @@ -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) diff --git a/x/gov/handler_sidechain.go b/x/gov/handler_sidechain.go index fe66bcd2b..cd0fb8302 100644 --- a/x/gov/handler_sidechain.go +++ b/x/gov/handler_sidechain.go @@ -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() } diff --git a/x/stake/keeper/validator.go b/x/stake/keeper/validator.go index 4187d79bc..5953d3a58 100644 --- a/x/stake/keeper/validator.go +++ b/x/stake/keeper/validator.go @@ -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()