testutil

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package testutil is a generated GoMock package.

Index

Constants

This section is empty.

Variables

Functions

func GetCmtConsPubKey

func GetCmtConsPubKey(v types.Validator) (cmtcrypto.PubKey, error)

GetCmtConsPubKey gets the validator's public key as a cmtcrypto.PubKey.

func NewValidator

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

NewValidator is a testing helper method to create validators in tests

func ToCmtValidator

func ToCmtValidator(v types.Validator, r math.Int) (*cmttypes.Validator, error)

ToCmtValidator casts an SDK validator to a CometBFT type Validator.

func ToCmtValidators

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

ToCmtValidators casts all validators to the corresponding CometBFT type.

Types

type Helper

type Helper struct {
	Ctx sdk.Context
	// 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) AddressCodec

func (m *MockAccountKeeper) AddressCodec() address.Codec

AddressCodec mocks base method.

func (*MockAccountKeeper) EXPECT

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

func (*MockAccountKeeper) GetAccount

GetAccount mocks base method.

func (*MockAccountKeeper) GetModuleAccount

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

GetModuleAccount mocks base method.

func (*MockAccountKeeper) GetModuleAddress

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

GetModuleAddress mocks base method.

func (*MockAccountKeeper) IterateAccounts

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

IterateAccounts mocks base method.

func (*MockAccountKeeper) SetModuleAccount

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

SetModuleAccount mocks base method.

type MockAccountKeeperMockRecorder

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

MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.

func (*MockAccountKeeperMockRecorder) AddressCodec

func (mr *MockAccountKeeperMockRecorder) AddressCodec() *gomock.Call

AddressCodec indicates an expected call of AddressCodec.

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 context.Context, name string, amt types0.Coins) error

BurnCoins mocks base method.

func (*MockBankKeeper) DelegateCoinsFromAccountToModule

func (m *MockBankKeeper) DelegateCoinsFromAccountToModule(ctx context.Context, senderAddr types0.AccAddress, recipientModule string, amt types0.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 context.Context, addr types0.AccAddress) types0.Coins

GetAllBalances mocks base method.

func (*MockBankKeeper) GetBalance

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

GetBalance mocks base method.

func (*MockBankKeeper) GetSupply

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

GetSupply mocks base method.

func (*MockBankKeeper) LockedCoins

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

LockedCoins mocks base method.

func (*MockBankKeeper) SendCoinsFromModuleToModule

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

SendCoinsFromModuleToModule mocks base method.

func (*MockBankKeeper) SpendableCoins

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

SpendableCoins mocks base method.

func (*MockBankKeeper) UndelegateCoinsFromModuleToAccount

func (m *MockBankKeeper) UndelegateCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr types0.AccAddress, amt types0.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() types.ValidatorSet

GetValidatorSet mocks base method.

func (*MockDelegationSet) IterateDelegations

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

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 MockRefStakingHooks

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

MockRefStakingHooks is a mock of RefStakingHooks interface.

func NewMockRefStakingHooks

func NewMockRefStakingHooks(ctrl *gomock.Controller) *MockRefStakingHooks

NewMockRefStakingHooks creates a new mock instance.

func (*MockRefStakingHooks) CheckDelegationAvailable

func (m *MockRefStakingHooks) CheckDelegationAvailable(ctx context.Context, delAddr, valAddr string) error

CheckDelegationAvailable mocks base method.

func (*MockRefStakingHooks) DelegationCoinsModified

func (m *MockRefStakingHooks) DelegationCoinsModified(ctx context.Context, delAddr, valAddr string, oldCoins, newCoins math.Int) error

DelegationCoinsModified mocks base method.

func (*MockRefStakingHooks) EXPECT

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

func (*MockRefStakingHooks) SpendCoinsForRef

func (m *MockRefStakingHooks) SpendCoinsForRef(ctx context.Context, addr string, totalAmount math.Int) (math.Int, error)

SpendCoinsForRef mocks base method.

type MockRefStakingHooksMockRecorder

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

MockRefStakingHooksMockRecorder is the mock recorder for MockRefStakingHooks.

func (*MockRefStakingHooksMockRecorder) CheckDelegationAvailable

func (mr *MockRefStakingHooksMockRecorder) CheckDelegationAvailable(ctx, delAddr, valAddr interface{}) *gomock.Call

CheckDelegationAvailable indicates an expected call of CheckDelegationAvailable.

func (*MockRefStakingHooksMockRecorder) DelegationCoinsModified

func (mr *MockRefStakingHooksMockRecorder) DelegationCoinsModified(ctx, delAddr, valAddr, oldCoins, newCoins interface{}) *gomock.Call

DelegationCoinsModified indicates an expected call of DelegationCoinsModified.

func (*MockRefStakingHooksMockRecorder) SpendCoinsForRef

func (mr *MockRefStakingHooksMockRecorder) SpendCoinsForRef(ctx, addr, totalAmount interface{}) *gomock.Call

SpendCoinsForRef indicates an expected call of SpendCoinsForRef.

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 context.Context, delAddr types0.AccAddress, valAddr types0.ValAddress) error

AfterDelegationModified mocks base method.

func (*MockStakingHooks) AfterUnbondingInitiated

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

AfterUnbondingInitiated mocks base method.

func (*MockStakingHooks) AfterValidatorBeginUnbonding

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

AfterValidatorBeginUnbonding mocks base method.

func (*MockStakingHooks) AfterValidatorBonded

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

AfterValidatorBonded mocks base method.

func (*MockStakingHooks) AfterValidatorCreated

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

AfterValidatorCreated mocks base method.

func (*MockStakingHooks) AfterValidatorRemoved

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

AfterValidatorRemoved mocks base method.

func (*MockStakingHooks) BeforeDelegationCreated

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

BeforeDelegationCreated mocks base method.

func (*MockStakingHooks) BeforeDelegationRemoved

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

BeforeDelegationRemoved mocks base method.

func (*MockStakingHooks) BeforeDelegationSharesModified

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

BeforeDelegationSharesModified mocks base method.

func (*MockStakingHooks) BeforeValidatorModified

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

BeforeValidatorModified mocks base method.

func (*MockStakingHooks) BeforeValidatorSlashed

func (m *MockStakingHooks) BeforeValidatorSlashed(ctx context.Context, valAddr types0.ValAddress, fraction math.LegacyDec) 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) GetPubKeyByConsAddr

func (m *MockValidatorSet) GetPubKeyByConsAddr(arg0 context.Context, arg1 types0.ConsAddress) (crypto.PublicKey, error)

GetPubKeyByConsAddr mocks base method.

func (*MockValidatorSet) IterateBondedValidatorsByPower

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

IterateBondedValidatorsByPower mocks base method.

func (*MockValidatorSet) IterateLastValidators

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

IterateLastValidators mocks base method.

func (*MockValidatorSet) IterateValidators

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

IterateValidators mocks base method.

func (*MockValidatorSet) Jail

Jail mocks base method.

func (*MockValidatorSet) MaxValidators

func (m *MockValidatorSet) MaxValidators(arg0 context.Context) (uint32, error)

MaxValidators mocks base method.

func (*MockValidatorSet) Slash

func (m *MockValidatorSet) Slash(arg0 context.Context, arg1 types0.ConsAddress, arg2, arg3 int64, arg4 math.LegacyDec) (math.Int, error)

Slash mocks base method.

func (*MockValidatorSet) SlashWithInfractionReason

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

SlashWithInfractionReason mocks base method.

func (*MockValidatorSet) StakingTokenSupply

func (m *MockValidatorSet) StakingTokenSupply(arg0 context.Context) (math.Int, error)

StakingTokenSupply mocks base method.

func (*MockValidatorSet) TotalBondedTokens

func (m *MockValidatorSet) TotalBondedTokens(arg0 context.Context) (math.Int, error)

TotalBondedTokens mocks base method.

func (*MockValidatorSet) Unjail

func (m *MockValidatorSet) Unjail(arg0 context.Context, arg1 types0.ConsAddress) error

Unjail mocks base method.

func (*MockValidatorSet) Validator

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

Validator mocks base method.

func (*MockValidatorSet) ValidatorByConsAddr

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

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) GetPubKeyByConsAddr

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

GetPubKeyByConsAddr indicates an expected call of GetPubKeyByConsAddr.

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