testutil

package
v0.48.86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Overview

Package testutil is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var AppConfig = appconfig.Compose(&appv1alpha1.Config{
	Modules: []*appv1alpha1.ModuleConfig{
		{
			Name: "runtime",
			Config: appconfig.WrapAny(&runtimev1alpha1.Module{
				AppName: "StakingApp",
				BeginBlockers: []string{
					minttypes.ModuleName,
					distrtypes.ModuleName,
					stakingtypes.ModuleName,
					genutiltypes.ModuleName,
					slashingtypes.ModuleName,
				},
				EndBlockers: []string{
					stakingtypes.ModuleName,
					genutiltypes.ModuleName,
				},
				InitGenesis: []string{
					authtypes.ModuleName,
					banktypes.ModuleName,
					distrtypes.ModuleName,
					stakingtypes.ModuleName,
					minttypes.ModuleName,
					slashingtypes.ModuleName,
					genutiltypes.ModuleName,
					paramstypes.ModuleName,
					consensustypes.ModuleName,
				},
			}),
		},
		{
			Name: authtypes.ModuleName,
			Config: appconfig.WrapAny(&authmodulev1.Module{
				Bech32Prefix: "cosmos",
				ModuleAccountPermissions: []*authmodulev1.ModuleAccountPermission{
					{Account: authtypes.FeeCollectorName},
					{Account: distrtypes.ModuleName},
					{Account: minttypes.ModuleName, Permissions: []string{authtypes.Minter}},
					{Account: stakingtypes.BondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}},
					{Account: stakingtypes.NotBondedPoolName, Permissions: []string{authtypes.Burner, stakingtypes.ModuleName}},
				},
			}),
		},

		{
			Name:   banktypes.ModuleName,
			Config: appconfig.WrapAny(&bankmodulev1.Module{}),
		},
		{
			Name:   stakingtypes.ModuleName,
			Config: appconfig.WrapAny(&stakingmodulev1.Module{}),
		},
		{
			Name:   slashingtypes.ModuleName,
			Config: appconfig.WrapAny(&slashingmodulev1.Module{}),
		},
		{
			Name:   paramstypes.ModuleName,
			Config: appconfig.WrapAny(&paramsmodulev1.Module{}),
		},
		{
			Name:   consensustypes.ModuleName,
			Config: appconfig.WrapAny(&consensusmodulev1.Module{}),
		},
		{
			Name:   "tx",
			Config: appconfig.WrapAny(&txconfigv1.Config{}),
		},
		{
			Name:   genutiltypes.ModuleName,
			Config: appconfig.WrapAny(&genutilmodulev1.Module{}),
		},
		{
			Name:   minttypes.ModuleName,
			Config: appconfig.WrapAny(&mintmodulev1.Module{}),
		},
		{
			Name:   distrtypes.ModuleName,
			Config: appconfig.WrapAny(&distrmodulev1.Module{}),
		},
	},
})

Functions

func GetTmConsPubKey

func GetTmConsPubKey(v types.Validator) (tmcrypto.PubKey, error)

GetTmConsPubKey gets the validator's public key as a tmcrypto.PubKey.

func NewValidator

func NewValidator(t testing.TB, operator sdk.ValAddress, pubKey cryptotypes.PubKey) types.Validator

NewValidator is a testing helper method to create validators in tests

func ToTmValidator

func ToTmValidator(v types.Validator, r math.Int) (*tmtypes.Validator, error)

ToTmValidator casts an SDK validator to a tendermint type Validator.

func ToTmValidators

func ToTmValidators(v types.Validators, r math.Int) ([]*tmtypes.Validator, error)

ToTmValidators casts all validators to the corresponding tendermint type.

func ZeroCommission

func ZeroCommission() stakingtypes.CommissionRates

ZeroCommission constructs a commission rates with all zeros.

Types

type Helper

type Helper struct {
	Ctx        sdk.Context
	Commission stakingtypes.CommissionRates
	// Coin Denomination
	Denom string
	// contains filtered or unexported fields
}

Helper is a structure which wraps the staking message server and provides methods useful in tests

func NewHelper

func NewHelper(t *testing.T, ctx sdk.Context, k *keeper.Keeper) *Helper

NewHelper creates a new instance of Helper.

func (*Helper) CheckDelegator

func (sh *Helper) CheckDelegator(delegator sdk.AccAddress, val sdk.ValAddress, found bool)

CheckDelegator asserts that a delegator exists

func (*Helper) CheckValidator

func (sh *Helper) CheckValidator(addr sdk.ValAddress, status stakingtypes.BondStatus, jailed bool) stakingtypes.Validator

CheckValidator asserts that a validor exists and has a given status (if status!="") and if has a right jailed flag.

func (*Helper) CreateValidator

func (sh *Helper) CreateValidator(addr sdk.ValAddress, pk cryptotypes.PubKey, stakeAmount math.Int, ok bool)

CreateValidator calls staking module `MsgServer/CreateValidator` to create a new validator

func (*Helper) CreateValidatorMsg

func (sh *Helper) CreateValidatorMsg(addr sdk.ValAddress, pk cryptotypes.PubKey, stakeAmount math.Int) *stakingtypes.MsgCreateValidator

CreateValidatorMsg returns a message used to create validator in this service.

func (*Helper) CreateValidatorWithMsg

CreateValidatorWithMsg calls staking module `MsgServer/CreateValidator`

func (*Helper) CreateValidatorWithValPower

func (sh *Helper) CreateValidatorWithValPower(addr sdk.ValAddress, pk cryptotypes.PubKey, valPower int64, ok bool) math.Int

CreateValidatorWithValPower calls staking module `MsgServer/CreateValidator` to create a new validator with zero commission

func (*Helper) Delegate

func (sh *Helper) Delegate(delegator sdk.AccAddress, val sdk.ValAddress, amount math.Int)

Delegate calls staking module staking module `MsgServer/Delegate` to delegate stake for a validator

func (*Helper) DelegateWithPower

func (sh *Helper) DelegateWithPower(delegator sdk.AccAddress, val sdk.ValAddress, power int64)

DelegateWithPower calls staking module `MsgServer/Delegate` to delegate stake for a validator

func (*Helper) TurnBlock

func (sh *Helper) TurnBlock(newTime time.Time) sdk.Context

TurnBlock calls EndBlocker and updates the block time

func (*Helper) TurnBlockTimeDiff

func (sh *Helper) TurnBlockTimeDiff(diff time.Duration) sdk.Context

TurnBlockTimeDiff calls EndBlocker and updates the block time by adding the duration to the current block time

func (*Helper) Undelegate

func (sh *Helper) Undelegate(delegator sdk.AccAddress, val sdk.ValAddress, amount math.Int, ok bool)

Undelegate calls staking module `MsgServer/Undelegate` to unbound some stake from a validator.

type MockAccountKeeper

type MockAccountKeeper struct {
	// contains filtered or unexported fields
}

MockAccountKeeper is a mock of AccountKeeper interface.

func NewMockAccountKeeper

func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper

NewMockAccountKeeper creates a new mock instance.

func (*MockAccountKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAccountKeeper) GetAccount

func (m *MockAccountKeeper) GetAccount(ctx types.Context, addr types.AccAddress) types.AccountI

GetAccount mocks base method.

func (*MockAccountKeeper) GetModuleAccount

func (m *MockAccountKeeper) GetModuleAccount(ctx types.Context, moduleName string) types.ModuleAccountI

GetModuleAccount mocks base method.

func (*MockAccountKeeper) GetModuleAddress

func (m *MockAccountKeeper) GetModuleAddress(name string) types.AccAddress

GetModuleAddress mocks base method.

func (*MockAccountKeeper) IterateAccounts

func (m *MockAccountKeeper) IterateAccounts(ctx types.Context, process func(types.AccountI) bool)

IterateAccounts mocks base method.

func (*MockAccountKeeper) SetModuleAccount

func (m *MockAccountKeeper) SetModuleAccount(arg0 types.Context, arg1 types.ModuleAccountI)

SetModuleAccount mocks base method.

type MockAccountKeeperMockRecorder

type MockAccountKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.

func (*MockAccountKeeperMockRecorder) GetAccount

func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call

GetAccount indicates an expected call of GetAccount.

func (*MockAccountKeeperMockRecorder) GetModuleAccount

func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interface{}) *gomock.Call

GetModuleAccount indicates an expected call of GetModuleAccount.

func (*MockAccountKeeperMockRecorder) GetModuleAddress

func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gomock.Call

GetModuleAddress indicates an expected call of GetModuleAddress.

func (*MockAccountKeeperMockRecorder) IterateAccounts

func (mr *MockAccountKeeperMockRecorder) IterateAccounts(ctx, process interface{}) *gomock.Call

IterateAccounts indicates an expected call of IterateAccounts.

func (*MockAccountKeeperMockRecorder) SetModuleAccount

func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 interface{}) *gomock.Call

SetModuleAccount indicates an expected call of SetModuleAccount.

type MockBankKeeper

type MockBankKeeper struct {
	// contains filtered or unexported fields
}

MockBankKeeper is a mock of BankKeeper interface.

func NewMockBankKeeper

func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper

NewMockBankKeeper creates a new mock instance.

func (*MockBankKeeper) BurnCoins

func (m *MockBankKeeper) BurnCoins(ctx types.Context, name string, amt types.Coins) error

BurnCoins mocks base method.

func (*MockBankKeeper) DelegateCoinsFromAccountToModule

func (m *MockBankKeeper) DelegateCoinsFromAccountToModule(ctx types.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error

DelegateCoinsFromAccountToModule mocks base method.

func (*MockBankKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockBankKeeper) GetAllBalances

func (m *MockBankKeeper) GetAllBalances(ctx types.Context, addr types.AccAddress) types.Coins

GetAllBalances mocks base method.

func (*MockBankKeeper) GetBalance

func (m *MockBankKeeper) GetBalance(ctx types.Context, addr types.AccAddress, denom string) types.Coin

GetBalance mocks base method.

func (*MockBankKeeper) GetSupply

func (m *MockBankKeeper) GetSupply(ctx types.Context, denom string) types.Coin

GetSupply mocks base method.

func (*MockBankKeeper) LockedCoins

func (m *MockBankKeeper) LockedCoins(ctx types.Context, addr types.AccAddress) types.Coins

LockedCoins mocks base method.

func (*MockBankKeeper) SendCoinsFromModuleToModule

func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx types.Context, senderPool, recipientPool string, amt types.Coins) error

SendCoinsFromModuleToModule mocks base method.

func (*MockBankKeeper) SpendableCoins

func (m *MockBankKeeper) SpendableCoins(ctx types.Context, addr types.AccAddress) types.Coins

SpendableCoins mocks base method.

func (*MockBankKeeper) UndelegateCoinsFromModuleToAccount

func (m *MockBankKeeper) UndelegateCoinsFromModuleToAccount(ctx types.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error

UndelegateCoinsFromModuleToAccount mocks base method.

type MockBankKeeperMockRecorder

type MockBankKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.

func (*MockBankKeeperMockRecorder) BurnCoins

func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, name, amt interface{}) *gomock.Call

BurnCoins indicates an expected call of BurnCoins.

func (*MockBankKeeperMockRecorder) DelegateCoinsFromAccountToModule

func (mr *MockBankKeeperMockRecorder) DelegateCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call

DelegateCoinsFromAccountToModule indicates an expected call of DelegateCoinsFromAccountToModule.

func (*MockBankKeeperMockRecorder) GetAllBalances

func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call

GetAllBalances indicates an expected call of GetAllBalances.

func (*MockBankKeeperMockRecorder) GetBalance

func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call

GetBalance indicates an expected call of GetBalance.

func (*MockBankKeeperMockRecorder) GetSupply

func (mr *MockBankKeeperMockRecorder) GetSupply(ctx, denom interface{}) *gomock.Call

GetSupply indicates an expected call of GetSupply.

func (*MockBankKeeperMockRecorder) LockedCoins

func (mr *MockBankKeeperMockRecorder) LockedCoins(ctx, addr interface{}) *gomock.Call

LockedCoins indicates an expected call of LockedCoins.

func (*MockBankKeeperMockRecorder) SendCoinsFromModuleToModule

func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderPool, recipientPool, amt interface{}) *gomock.Call

SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule.

func (*MockBankKeeperMockRecorder) SpendableCoins

func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call

SpendableCoins indicates an expected call of SpendableCoins.

func (*MockBankKeeperMockRecorder) UndelegateCoinsFromModuleToAccount

func (mr *MockBankKeeperMockRecorder) UndelegateCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call

UndelegateCoinsFromModuleToAccount indicates an expected call of UndelegateCoinsFromModuleToAccount.

type MockDelegationSet

type MockDelegationSet struct {
	// contains filtered or unexported fields
}

MockDelegationSet is a mock of DelegationSet interface.

func NewMockDelegationSet

func NewMockDelegationSet(ctrl *gomock.Controller) *MockDelegationSet

NewMockDelegationSet creates a new mock instance.

func (*MockDelegationSet) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDelegationSet) GetValidatorSet

func (m *MockDelegationSet) GetValidatorSet() types0.ValidatorSet

GetValidatorSet mocks base method.

func (*MockDelegationSet) IterateDelegations

func (m *MockDelegationSet) IterateDelegations(ctx types.Context, delegator types.AccAddress, fn func(int64, types0.DelegationI) bool)

IterateDelegations mocks base method.

type MockDelegationSetMockRecorder

type MockDelegationSetMockRecorder struct {
	// contains filtered or unexported fields
}

MockDelegationSetMockRecorder is the mock recorder for MockDelegationSet.

func (*MockDelegationSetMockRecorder) GetValidatorSet

func (mr *MockDelegationSetMockRecorder) GetValidatorSet() *gomock.Call

GetValidatorSet indicates an expected call of GetValidatorSet.

func (*MockDelegationSetMockRecorder) IterateDelegations

func (mr *MockDelegationSetMockRecorder) IterateDelegations(ctx, delegator, fn interface{}) *gomock.Call

IterateDelegations indicates an expected call of IterateDelegations.

type MockDistributionKeeper

type MockDistributionKeeper struct {
	// contains filtered or unexported fields
}

MockDistributionKeeper is a mock of DistributionKeeper interface.

func NewMockDistributionKeeper

func NewMockDistributionKeeper(ctrl *gomock.Controller) *MockDistributionKeeper

NewMockDistributionKeeper creates a new mock instance.

func (*MockDistributionKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDistributionKeeper) GetFeePoolCommunityCoins

func (m *MockDistributionKeeper) GetFeePoolCommunityCoins(ctx types.Context) types.DecCoins

GetFeePoolCommunityCoins mocks base method.

func (*MockDistributionKeeper) GetValidatorOutstandingRewardsCoins

func (m *MockDistributionKeeper) GetValidatorOutstandingRewardsCoins(ctx types.Context, val types.ValAddress) types.DecCoins

GetValidatorOutstandingRewardsCoins mocks base method.

type MockDistributionKeeperMockRecorder

type MockDistributionKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockDistributionKeeperMockRecorder is the mock recorder for MockDistributionKeeper.

func (*MockDistributionKeeperMockRecorder) GetFeePoolCommunityCoins

func (mr *MockDistributionKeeperMockRecorder) GetFeePoolCommunityCoins(ctx interface{}) *gomock.Call

GetFeePoolCommunityCoins indicates an expected call of GetFeePoolCommunityCoins.

func (*MockDistributionKeeperMockRecorder) GetValidatorOutstandingRewardsCoins

func (mr *MockDistributionKeeperMockRecorder) GetValidatorOutstandingRewardsCoins(ctx, val interface{}) *gomock.Call

GetValidatorOutstandingRewardsCoins indicates an expected call of GetValidatorOutstandingRewardsCoins.

type MockStakingHooks

type MockStakingHooks struct {
	// contains filtered or unexported fields
}

MockStakingHooks is a mock of StakingHooks interface.

func NewMockStakingHooks

func NewMockStakingHooks(ctrl *gomock.Controller) *MockStakingHooks

NewMockStakingHooks creates a new mock instance.

func (*MockStakingHooks) AfterDelegationModified

func (m *MockStakingHooks) AfterDelegationModified(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error

AfterDelegationModified mocks base method.

func (*MockStakingHooks) AfterUnbondingInitiated

func (m *MockStakingHooks) AfterUnbondingInitiated(ctx types.Context, id uint64) error

AfterUnbondingInitiated mocks base method.

func (*MockStakingHooks) AfterValidatorBeginUnbonding

func (m *MockStakingHooks) AfterValidatorBeginUnbonding(ctx types.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error

AfterValidatorBeginUnbonding mocks base method.

func (*MockStakingHooks) AfterValidatorBonded

func (m *MockStakingHooks) AfterValidatorBonded(ctx types.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error

AfterValidatorBonded mocks base method.

func (*MockStakingHooks) AfterValidatorCreated

func (m *MockStakingHooks) AfterValidatorCreated(ctx types.Context, valAddr types.ValAddress) error

AfterValidatorCreated mocks base method.

func (*MockStakingHooks) AfterValidatorRemoved

func (m *MockStakingHooks) AfterValidatorRemoved(ctx types.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error

AfterValidatorRemoved mocks base method.

func (*MockStakingHooks) BeforeDelegationCreated

func (m *MockStakingHooks) BeforeDelegationCreated(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error

BeforeDelegationCreated mocks base method.

func (*MockStakingHooks) BeforeDelegationRemoved

func (m *MockStakingHooks) BeforeDelegationRemoved(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error

BeforeDelegationRemoved mocks base method.

func (*MockStakingHooks) BeforeDelegationSharesModified

func (m *MockStakingHooks) BeforeDelegationSharesModified(ctx types.Context, delAddr types.AccAddress, valAddr types.ValAddress) error

BeforeDelegationSharesModified mocks base method.

func (*MockStakingHooks) BeforeValidatorModified

func (m *MockStakingHooks) BeforeValidatorModified(ctx types.Context, valAddr types.ValAddress) error

BeforeValidatorModified mocks base method.

func (*MockStakingHooks) BeforeValidatorSlashed

func (m *MockStakingHooks) BeforeValidatorSlashed(ctx types.Context, valAddr types.ValAddress, fraction types.Dec) error

BeforeValidatorSlashed mocks base method.

func (*MockStakingHooks) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockStakingHooksMockRecorder

type MockStakingHooksMockRecorder struct {
	// contains filtered or unexported fields
}

MockStakingHooksMockRecorder is the mock recorder for MockStakingHooks.

func (*MockStakingHooksMockRecorder) AfterDelegationModified

func (mr *MockStakingHooksMockRecorder) AfterDelegationModified(ctx, delAddr, valAddr interface{}) *gomock.Call

AfterDelegationModified indicates an expected call of AfterDelegationModified.

func (*MockStakingHooksMockRecorder) AfterUnbondingInitiated

func (mr *MockStakingHooksMockRecorder) AfterUnbondingInitiated(ctx, id interface{}) *gomock.Call

AfterUnbondingInitiated indicates an expected call of AfterUnbondingInitiated.

func (*MockStakingHooksMockRecorder) AfterValidatorBeginUnbonding

func (mr *MockStakingHooksMockRecorder) AfterValidatorBeginUnbonding(ctx, consAddr, valAddr interface{}) *gomock.Call

AfterValidatorBeginUnbonding indicates an expected call of AfterValidatorBeginUnbonding.

func (*MockStakingHooksMockRecorder) AfterValidatorBonded

func (mr *MockStakingHooksMockRecorder) AfterValidatorBonded(ctx, consAddr, valAddr interface{}) *gomock.Call

AfterValidatorBonded indicates an expected call of AfterValidatorBonded.

func (*MockStakingHooksMockRecorder) AfterValidatorCreated

func (mr *MockStakingHooksMockRecorder) AfterValidatorCreated(ctx, valAddr interface{}) *gomock.Call

AfterValidatorCreated indicates an expected call of AfterValidatorCreated.

func (*MockStakingHooksMockRecorder) AfterValidatorRemoved

func (mr *MockStakingHooksMockRecorder) AfterValidatorRemoved(ctx, consAddr, valAddr interface{}) *gomock.Call

AfterValidatorRemoved indicates an expected call of AfterValidatorRemoved.

func (*MockStakingHooksMockRecorder) BeforeDelegationCreated

func (mr *MockStakingHooksMockRecorder) BeforeDelegationCreated(ctx, delAddr, valAddr interface{}) *gomock.Call

BeforeDelegationCreated indicates an expected call of BeforeDelegationCreated.

func (*MockStakingHooksMockRecorder) BeforeDelegationRemoved

func (mr *MockStakingHooksMockRecorder) BeforeDelegationRemoved(ctx, delAddr, valAddr interface{}) *gomock.Call

BeforeDelegationRemoved indicates an expected call of BeforeDelegationRemoved.

func (*MockStakingHooksMockRecorder) BeforeDelegationSharesModified

func (mr *MockStakingHooksMockRecorder) BeforeDelegationSharesModified(ctx, delAddr, valAddr interface{}) *gomock.Call

BeforeDelegationSharesModified indicates an expected call of BeforeDelegationSharesModified.

func (*MockStakingHooksMockRecorder) BeforeValidatorModified

func (mr *MockStakingHooksMockRecorder) BeforeValidatorModified(ctx, valAddr interface{}) *gomock.Call

BeforeValidatorModified indicates an expected call of BeforeValidatorModified.

func (*MockStakingHooksMockRecorder) BeforeValidatorSlashed

func (mr *MockStakingHooksMockRecorder) BeforeValidatorSlashed(ctx, valAddr, fraction interface{}) *gomock.Call

BeforeValidatorSlashed indicates an expected call of BeforeValidatorSlashed.

type MockValidatorSet

type MockValidatorSet struct {
	// contains filtered or unexported fields
}

MockValidatorSet is a mock of ValidatorSet interface.

func NewMockValidatorSet

func NewMockValidatorSet(ctrl *gomock.Controller) *MockValidatorSet

NewMockValidatorSet creates a new mock instance.

func (*MockValidatorSet) Delegation

Delegation mocks base method.

func (*MockValidatorSet) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockValidatorSet) IterateBondedValidatorsByPower

func (m *MockValidatorSet) IterateBondedValidatorsByPower(arg0 types.Context, arg1 func(int64, types0.ValidatorI) bool)

IterateBondedValidatorsByPower mocks base method.

func (*MockValidatorSet) IterateLastValidators

func (m *MockValidatorSet) IterateLastValidators(arg0 types.Context, arg1 func(int64, types0.ValidatorI) bool)

IterateLastValidators mocks base method.

func (*MockValidatorSet) IterateValidators

func (m *MockValidatorSet) IterateValidators(arg0 types.Context, arg1 func(int64, types0.ValidatorI) bool)

IterateValidators mocks base method.

func (*MockValidatorSet) Jail

func (m *MockValidatorSet) Jail(arg0 types.Context, arg1 types.ConsAddress)

Jail mocks base method.

func (*MockValidatorSet) MaxValidators

func (m *MockValidatorSet) MaxValidators(arg0 types.Context) uint32

MaxValidators mocks base method.

func (*MockValidatorSet) Slash

func (m *MockValidatorSet) Slash(arg0 types.Context, arg1 types.ConsAddress, arg2, arg3 int64, arg4 types.Dec) math.Int

Slash mocks base method.

func (*MockValidatorSet) SlashWithInfractionReason

func (m *MockValidatorSet) SlashWithInfractionReason(arg0 types.Context, arg1 types.ConsAddress, arg2, arg3 int64, arg4 types.Dec, arg5 types0.Infraction) math.Int

SlashWithInfractionReason mocks base method.

func (*MockValidatorSet) StakingTokenSupply

func (m *MockValidatorSet) StakingTokenSupply(arg0 types.Context) math.Int

StakingTokenSupply mocks base method.

func (*MockValidatorSet) TotalBondedTokens

func (m *MockValidatorSet) TotalBondedTokens(arg0 types.Context) math.Int

TotalBondedTokens mocks base method.

func (*MockValidatorSet) Unjail

func (m *MockValidatorSet) Unjail(arg0 types.Context, arg1 types.ConsAddress)

Unjail mocks base method.

func (*MockValidatorSet) Validator

func (m *MockValidatorSet) Validator(arg0 types.Context, arg1 types.ValAddress) types0.ValidatorI

Validator mocks base method.

func (*MockValidatorSet) ValidatorByConsAddr

func (m *MockValidatorSet) ValidatorByConsAddr(arg0 types.Context, arg1 types.ConsAddress) types0.ValidatorI

ValidatorByConsAddr mocks base method.

type MockValidatorSetMockRecorder

type MockValidatorSetMockRecorder struct {
	// contains filtered or unexported fields
}

MockValidatorSetMockRecorder is the mock recorder for MockValidatorSet.

func (*MockValidatorSetMockRecorder) Delegation

func (mr *MockValidatorSetMockRecorder) Delegation(arg0, arg1, arg2 interface{}) *gomock.Call

Delegation indicates an expected call of Delegation.

func (*MockValidatorSetMockRecorder) IterateBondedValidatorsByPower

func (mr *MockValidatorSetMockRecorder) IterateBondedValidatorsByPower(arg0, arg1 interface{}) *gomock.Call

IterateBondedValidatorsByPower indicates an expected call of IterateBondedValidatorsByPower.

func (*MockValidatorSetMockRecorder) IterateLastValidators

func (mr *MockValidatorSetMockRecorder) IterateLastValidators(arg0, arg1 interface{}) *gomock.Call

IterateLastValidators indicates an expected call of IterateLastValidators.

func (*MockValidatorSetMockRecorder) IterateValidators

func (mr *MockValidatorSetMockRecorder) IterateValidators(arg0, arg1 interface{}) *gomock.Call

IterateValidators indicates an expected call of IterateValidators.

func (*MockValidatorSetMockRecorder) Jail

func (mr *MockValidatorSetMockRecorder) Jail(arg0, arg1 interface{}) *gomock.Call

Jail indicates an expected call of Jail.

func (*MockValidatorSetMockRecorder) MaxValidators

func (mr *MockValidatorSetMockRecorder) MaxValidators(arg0 interface{}) *gomock.Call

MaxValidators indicates an expected call of MaxValidators.

func (*MockValidatorSetMockRecorder) Slash

func (mr *MockValidatorSetMockRecorder) Slash(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

Slash indicates an expected call of Slash.

func (*MockValidatorSetMockRecorder) SlashWithInfractionReason

func (mr *MockValidatorSetMockRecorder) SlashWithInfractionReason(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call

SlashWithInfractionReason indicates an expected call of SlashWithInfractionReason.

func (*MockValidatorSetMockRecorder) StakingTokenSupply

func (mr *MockValidatorSetMockRecorder) StakingTokenSupply(arg0 interface{}) *gomock.Call

StakingTokenSupply indicates an expected call of StakingTokenSupply.

func (*MockValidatorSetMockRecorder) TotalBondedTokens

func (mr *MockValidatorSetMockRecorder) TotalBondedTokens(arg0 interface{}) *gomock.Call

TotalBondedTokens indicates an expected call of TotalBondedTokens.

func (*MockValidatorSetMockRecorder) Unjail

func (mr *MockValidatorSetMockRecorder) Unjail(arg0, arg1 interface{}) *gomock.Call

Unjail indicates an expected call of Unjail.

func (*MockValidatorSetMockRecorder) Validator

func (mr *MockValidatorSetMockRecorder) Validator(arg0, arg1 interface{}) *gomock.Call

Validator indicates an expected call of Validator.

func (*MockValidatorSetMockRecorder) ValidatorByConsAddr

func (mr *MockValidatorSetMockRecorder) ValidatorByConsAddr(arg0, arg1 interface{}) *gomock.Call

ValidatorByConsAddr indicates an expected call of ValidatorByConsAddr.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL