diff --git a/changelog.md b/changelog.md index f0210b79c8..ec047c11d4 100644 --- a/changelog.md +++ b/changelog.md @@ -20,6 +20,7 @@ * [1630](https://github.com/zeta-chain/node/pull/1630) added password prompts for hotkey and tss keyshare in zetaclient Starting zetaclient now requires two passwords to be input; one for the hotkey and another for the tss key-share. +* [1760](https://github.com/zeta-chain/node/pull/1760) - Make staking keeper private in crosschain module ### Fixes diff --git a/x/crosschain/keeper/keeper.go b/x/crosschain/keeper/keeper.go index 52b25bb981..745372a48a 100644 --- a/x/crosschain/keeper/keeper.go +++ b/x/crosschain/keeper/keeper.go @@ -19,7 +19,7 @@ type ( storeKey storetypes.StoreKey memKey storetypes.StoreKey - StakingKeeper types.StakingKeeper + stakingKeeper types.StakingKeeper paramstore paramtypes.Subspace authKeeper types.AccountKeeper bankKeeper types.BankKeeper @@ -49,7 +49,7 @@ func NewKeeper( cdc: cdc, storeKey: storeKey, memKey: memKey, - StakingKeeper: stakingKeeper, + stakingKeeper: stakingKeeper, paramstore: paramstore, authKeeper: authKeeper, bankKeeper: bankKeeper, @@ -71,7 +71,7 @@ func (k Keeper) GetBankKeeper() types.BankKeeper { } func (k Keeper) GetStakingKeeper() types.StakingKeeper { - return k.StakingKeeper + return k.stakingKeeper } func (k Keeper) GetFungibleKeeper() types.FungibleKeeper { diff --git a/x/crosschain/keeper/msg_server_gas_price_voter.go b/x/crosschain/keeper/msg_server_gas_price_voter.go index e91703d4ec..2c56b3f266 100644 --- a/x/crosschain/keeper/msg_server_gas_price_voter.go +++ b/x/crosschain/keeper/msg_server_gas_price_voter.go @@ -103,7 +103,7 @@ func medianOfArray(values []uint64) int { // ResetGasMeterAndConsumeGas reset first the gas meter consumed value to zero and set it back to the new value // 'gasUsed' -func (k *Keeper) ResetGasMeterAndConsumeGas(ctx sdk.Context, gasUsed uint64) { +func (k Keeper) ResetGasMeterAndConsumeGas(ctx sdk.Context, gasUsed uint64) { // reset the gas count ctx.GasMeter().RefundGas(ctx.GasMeter().GasConsumed(), "reset the gas count") ctx.GasMeter().ConsumeGas(gasUsed, "apply evm transaction") diff --git a/x/crosschain/keeper/msg_server_vote_inbound_tx_test.go b/x/crosschain/keeper/msg_server_vote_inbound_tx_test.go index c484b585d3..1a8c742c5b 100644 --- a/x/crosschain/keeper/msg_server_vote_inbound_tx_test.go +++ b/x/crosschain/keeper/msg_server_vote_inbound_tx_test.go @@ -18,7 +18,7 @@ import ( ) func setObservers(t *testing.T, k *keeper.Keeper, ctx sdk.Context, zk keepertest.ZetaKeepers) []string { - validators := k.StakingKeeper.GetAllValidators(ctx) + validators := k.GetStakingKeeper().GetAllValidators(ctx) validatorAddressListFormatted := make([]string, len(validators)) for i, validator := range validators { @@ -85,7 +85,7 @@ func TestNoDoubleEventProtections(t *testing.T) { ) // Convert the validator address into a user address. - validators := k.StakingKeeper.GetAllValidators(ctx) + validators := k.GetStakingKeeper().GetAllValidators(ctx) validatorAddress := validators[0].OperatorAddress valAddr, _ := sdk.ValAddressFromBech32(validatorAddress) addresstmp, _ := sdk.AccAddressFromHexUnsafe(hex.EncodeToString(valAddr.Bytes()))