keeper

package
v1.0.0-rc7 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 39 Imported by: 2

Documentation

Overview

Package keeper is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectCreateClientMock added in v1.0.0

func ExpectCreateClientMock(ctx sdk.Context, mocks MockedKeepers, clientID string, clientState *ibctmtypes.ClientState, consState *ibctmtypes.ConsensusState) *gomock.Call

func ExpectGetCapabilityMock added in v1.0.0

func ExpectGetCapabilityMock(ctx sdk.Context, mocks MockedKeepers, times int) *gomock.Call

func ExpectLatestConsensusStateMock added in v1.0.0

func ExpectLatestConsensusStateMock(ctx sdk.Context, mocks MockedKeepers, clientID string, consState *ibctmtypes.ConsensusState) *gomock.Call

func GenPubKey

func GenPubKey() (crypto.PubKey, error)

Generates a public key for unit tests (abiding by tricky interface implementations from tm/sdk)

func GetMocksForCreateConsumerClient added in v0.2.0

func GetMocksForCreateConsumerClient(ctx sdk.Context, mocks *MockedKeepers,
	expectedChainID string, expectedLatestHeight clienttypes.Height) []*gomock.Call

GetMocksForCreateConsumerClient returns mock expectations needed to call CreateConsumerClient().

func GetMocksForHandleSlashPacket added in v1.0.0

func GetMocksForHandleSlashPacket(ctx sdk.Context, mocks MockedKeepers,
	expectedProviderValConsAddr sdk.ConsAddress,
	valToReturn stakingtypes.Validator, expectJailing bool) []*gomock.Call

func GetMocksForMakeConsumerGenesis added in v0.2.0

func GetMocksForMakeConsumerGenesis(ctx sdk.Context, mocks *MockedKeepers,
	unbondingTimeToInject time.Duration) []*gomock.Call

GetMocksForMakeConsumerGenesis returns mock expectations needed to call MakeConsumerGenesis().

func GetMocksForSetConsumerChain added in v0.2.0

func GetMocksForSetConsumerChain(ctx sdk.Context, mocks *MockedKeepers,
	chainIDToInject string) []*gomock.Call

GetMocksForSetConsumerChain returns mock expectations needed to call SetConsumerChain().

func GetMocksForStopConsumerChain added in v0.2.0

func GetMocksForStopConsumerChain(ctx sdk.Context, mocks *MockedKeepers) []*gomock.Call

GetMocksForStopConsumerChain returns mock expectations needed to call StopConsumerChain().

func GetNewCrossChainValidator added in v1.0.0

func GetNewCrossChainValidator(t *testing.T) consumertypes.CrossChainValidator

Obtains a CrossChainValidator with a newly generated key, and randomized field values

func GetNewSlashPacketData added in v1.0.0

func GetNewSlashPacketData() ccvtypes.SlashPacketData

Obtains slash packet data with a newly generated key, and randomized field values

func GetNewVSCMaturedPacketData added in v1.0.0

func GetNewVSCMaturedPacketData() ccvtypes.VSCMaturedPacketData

Obtains vsc matured packet data with a newly generated key

func GetTestConsumerAdditionProp added in v1.0.0

func GetTestConsumerAdditionProp() *providertypes.ConsumerAdditionProposal

func NewInMemConsumerKeeper added in v0.2.0

func NewInMemConsumerKeeper(params InMemKeeperParams, mocks MockedKeepers) consumerkeeper.Keeper

NewInMemConsumerKeeper instantiates an in-mem consumer keeper from params and mocked keepers

func NewInMemProviderKeeper added in v0.2.0

func NewInMemProviderKeeper(params InMemKeeperParams, mocks MockedKeepers) providerkeeper.Keeper

NewInMemProviderKeeper instantiates an in-mem provider keeper from params and mocked keepers

func SetupForStoppingConsumerChain added in v0.2.0

func SetupForStoppingConsumerChain(t *testing.T, ctx sdk.Context,
	providerKeeper *providerkeeper.Keeper, mocks MockedKeepers,
)

SetupForStoppingConsumerChain registers expected mock calls and corresponding state setup which asserts that a consumer chain was properly stopped from StopConsumerChain().

Types

type InMemKeeperParams added in v0.2.0

type InMemKeeperParams struct {
	Cdc            *codec.ProtoCodec
	StoreKey       *storetypes.KVStoreKey
	ParamsSubspace *paramstypes.Subspace
	Ctx            sdk.Context
}

Parameters needed to instantiate an in-memory keeper

func NewInMemKeeperParams added in v0.2.0

func NewInMemKeeperParams(t testing.TB) InMemKeeperParams

NewInMemKeeperParams instantiates in-memory keeper params with default values

func (*InMemKeeperParams) RegisterSdkCryptoCodecInterfaces added in v0.2.0

func (params *InMemKeeperParams) RegisterSdkCryptoCodecInterfaces()

Registers proto interfaces for params.Cdc

For now, we explicitly force certain unit tests to register sdk crypto interfaces. TODO: This function will be executed automatically once https://github.com/cosmos/interchain-security/issues/273 is solved.

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

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

GetModuleAccount mocks base method.

type MockAccountKeeperMockRecorder

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

MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.

func (*MockAccountKeeperMockRecorder) GetModuleAccount

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

GetModuleAccount indicates an expected call of GetModuleAccount.

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

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

SendCoinsFromModuleToModule mocks base method.

type MockBankKeeperMockRecorder

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

MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.

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

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

SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule.

type MockChannelKeeper

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

MockChannelKeeper is a mock of ChannelKeeper interface.

func NewMockChannelKeeper

func NewMockChannelKeeper(ctrl *gomock.Controller) *MockChannelKeeper

NewMockChannelKeeper creates a new mock instance.

func (*MockChannelKeeper) ChanCloseInit

func (m *MockChannelKeeper) ChanCloseInit(ctx types.Context, portID, channelID string, chanCap *types1.Capability) error

ChanCloseInit mocks base method.

func (*MockChannelKeeper) EXPECT

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

func (*MockChannelKeeper) GetChannel

func (m *MockChannelKeeper) GetChannel(ctx types.Context, srcPort, srcChan string) (types7.Channel, bool)

GetChannel mocks base method.

func (*MockChannelKeeper) GetNextSequenceSend

func (m *MockChannelKeeper) GetNextSequenceSend(ctx types.Context, portID, channelID string) (uint64, bool)

GetNextSequenceSend mocks base method.

func (*MockChannelKeeper) SendPacket

func (m *MockChannelKeeper) SendPacket(ctx types.Context, channelCap *types1.Capability, packet exported.PacketI) error

SendPacket mocks base method.

func (*MockChannelKeeper) WriteAcknowledgement

func (m *MockChannelKeeper) WriteAcknowledgement(ctx types.Context, chanCap *types1.Capability, packet exported.PacketI, acknowledgement exported.Acknowledgement) error

WriteAcknowledgement mocks base method.

type MockChannelKeeperMockRecorder

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

MockChannelKeeperMockRecorder is the mock recorder for MockChannelKeeper.

func (*MockChannelKeeperMockRecorder) ChanCloseInit

func (mr *MockChannelKeeperMockRecorder) ChanCloseInit(ctx, portID, channelID, chanCap interface{}) *gomock.Call

ChanCloseInit indicates an expected call of ChanCloseInit.

func (*MockChannelKeeperMockRecorder) GetChannel

func (mr *MockChannelKeeperMockRecorder) GetChannel(ctx, srcPort, srcChan interface{}) *gomock.Call

GetChannel indicates an expected call of GetChannel.

func (*MockChannelKeeperMockRecorder) GetNextSequenceSend

func (mr *MockChannelKeeperMockRecorder) GetNextSequenceSend(ctx, portID, channelID interface{}) *gomock.Call

GetNextSequenceSend indicates an expected call of GetNextSequenceSend.

func (*MockChannelKeeperMockRecorder) SendPacket

func (mr *MockChannelKeeperMockRecorder) SendPacket(ctx, channelCap, packet interface{}) *gomock.Call

SendPacket indicates an expected call of SendPacket.

func (*MockChannelKeeperMockRecorder) WriteAcknowledgement

func (mr *MockChannelKeeperMockRecorder) WriteAcknowledgement(ctx, chanCap, packet, acknowledgement interface{}) *gomock.Call

WriteAcknowledgement indicates an expected call of WriteAcknowledgement.

type MockClientKeeper

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

MockClientKeeper is a mock of ClientKeeper interface.

func NewMockClientKeeper

func NewMockClientKeeper(ctrl *gomock.Controller) *MockClientKeeper

NewMockClientKeeper creates a new mock instance.

func (*MockClientKeeper) CreateClient

func (m *MockClientKeeper) CreateClient(ctx types.Context, clientState exported.ClientState, consensusState exported.ConsensusState) (string, error)

CreateClient mocks base method.

func (*MockClientKeeper) EXPECT

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

func (*MockClientKeeper) GetClientState

func (m *MockClientKeeper) GetClientState(ctx types.Context, clientID string) (exported.ClientState, bool)

GetClientState mocks base method.

func (*MockClientKeeper) GetLatestClientConsensusState

func (m *MockClientKeeper) GetLatestClientConsensusState(ctx types.Context, clientID string) (exported.ConsensusState, bool)

GetLatestClientConsensusState mocks base method.

func (*MockClientKeeper) GetSelfConsensusState

func (m *MockClientKeeper) GetSelfConsensusState(ctx types.Context, height exported.Height) (exported.ConsensusState, error)

GetSelfConsensusState mocks base method.

type MockClientKeeperMockRecorder

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

MockClientKeeperMockRecorder is the mock recorder for MockClientKeeper.

func (*MockClientKeeperMockRecorder) CreateClient

func (mr *MockClientKeeperMockRecorder) CreateClient(ctx, clientState, consensusState interface{}) *gomock.Call

CreateClient indicates an expected call of CreateClient.

func (*MockClientKeeperMockRecorder) GetClientState

func (mr *MockClientKeeperMockRecorder) GetClientState(ctx, clientID interface{}) *gomock.Call

GetClientState indicates an expected call of GetClientState.

func (*MockClientKeeperMockRecorder) GetLatestClientConsensusState

func (mr *MockClientKeeperMockRecorder) GetLatestClientConsensusState(ctx, clientID interface{}) *gomock.Call

GetLatestClientConsensusState indicates an expected call of GetLatestClientConsensusState.

func (*MockClientKeeperMockRecorder) GetSelfConsensusState

func (mr *MockClientKeeperMockRecorder) GetSelfConsensusState(ctx, height interface{}) *gomock.Call

GetSelfConsensusState indicates an expected call of GetSelfConsensusState.

type MockConnectionKeeper

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

MockConnectionKeeper is a mock of ConnectionKeeper interface.

func NewMockConnectionKeeper

func NewMockConnectionKeeper(ctrl *gomock.Controller) *MockConnectionKeeper

NewMockConnectionKeeper creates a new mock instance.

func (*MockConnectionKeeper) EXPECT

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

func (*MockConnectionKeeper) GetConnection

func (m *MockConnectionKeeper) GetConnection(ctx types.Context, connectionID string) (types6.ConnectionEnd, bool)

GetConnection mocks base method.

type MockConnectionKeeperMockRecorder

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

MockConnectionKeeperMockRecorder is the mock recorder for MockConnectionKeeper.

func (*MockConnectionKeeperMockRecorder) GetConnection

func (mr *MockConnectionKeeperMockRecorder) GetConnection(ctx, connectionID interface{}) *gomock.Call

GetConnection indicates an expected call of GetConnection.

type MockConsumerHooks

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

MockConsumerHooks is a mock of ConsumerHooks interface.

func NewMockConsumerHooks

func NewMockConsumerHooks(ctrl *gomock.Controller) *MockConsumerHooks

NewMockConsumerHooks creates a new mock instance.

func (*MockConsumerHooks) AfterValidatorBonded

func (m *MockConsumerHooks) AfterValidatorBonded(ctx types.Context, consAddr types.ConsAddress, arg2 types.ValAddress)

AfterValidatorBonded mocks base method.

func (*MockConsumerHooks) EXPECT

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

type MockConsumerHooksMockRecorder

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

MockConsumerHooksMockRecorder is the mock recorder for MockConsumerHooks.

func (*MockConsumerHooksMockRecorder) AfterValidatorBonded

func (mr *MockConsumerHooksMockRecorder) AfterValidatorBonded(ctx, consAddr, arg2 interface{}) *gomock.Call

AfterValidatorBonded indicates an expected call of AfterValidatorBonded.

type MockEvidenceKeeper added in v1.0.0

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

MockEvidenceKeeper is a mock of EvidenceKeeper interface.

func NewMockEvidenceKeeper added in v1.0.0

func NewMockEvidenceKeeper(ctrl *gomock.Controller) *MockEvidenceKeeper

NewMockEvidenceKeeper creates a new mock instance.

func (*MockEvidenceKeeper) EXPECT added in v1.0.0

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

func (*MockEvidenceKeeper) HandleEquivocationEvidence added in v1.0.0

func (m *MockEvidenceKeeper) HandleEquivocationEvidence(ctx types.Context, evidence *types2.Equivocation)

HandleEquivocationEvidence mocks base method.

type MockEvidenceKeeperMockRecorder added in v1.0.0

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

MockEvidenceKeeperMockRecorder is the mock recorder for MockEvidenceKeeper.

func (*MockEvidenceKeeperMockRecorder) HandleEquivocationEvidence added in v1.0.0

func (mr *MockEvidenceKeeperMockRecorder) HandleEquivocationEvidence(ctx, evidence interface{}) *gomock.Call

HandleEquivocationEvidence indicates an expected call of HandleEquivocationEvidence.

type MockIBCCoreKeeper

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

MockIBCCoreKeeper is a mock of IBCCoreKeeper interface.

func NewMockIBCCoreKeeper

func NewMockIBCCoreKeeper(ctrl *gomock.Controller) *MockIBCCoreKeeper

NewMockIBCCoreKeeper creates a new mock instance.

func (*MockIBCCoreKeeper) ChannelOpenInit

ChannelOpenInit mocks base method.

func (*MockIBCCoreKeeper) EXPECT

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

type MockIBCCoreKeeperMockRecorder

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

MockIBCCoreKeeperMockRecorder is the mock recorder for MockIBCCoreKeeper.

func (*MockIBCCoreKeeperMockRecorder) ChannelOpenInit

func (mr *MockIBCCoreKeeperMockRecorder) ChannelOpenInit(goCtx, msg interface{}) *gomock.Call

ChannelOpenInit indicates an expected call of ChannelOpenInit.

type MockIBCTransferKeeper

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

MockIBCTransferKeeper is a mock of IBCTransferKeeper interface.

func NewMockIBCTransferKeeper

func NewMockIBCTransferKeeper(ctrl *gomock.Controller) *MockIBCTransferKeeper

NewMockIBCTransferKeeper creates a new mock instance.

func (*MockIBCTransferKeeper) EXPECT

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

func (*MockIBCTransferKeeper) SendTransfer

func (m *MockIBCTransferKeeper) SendTransfer(ctx types.Context, sourcePort, sourceChannel string, token types.Coin, sender types.AccAddress, receiver string, timeoutHeight types5.Height, timeoutTimestamp uint64) error

SendTransfer mocks base method.

type MockIBCTransferKeeperMockRecorder

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

MockIBCTransferKeeperMockRecorder is the mock recorder for MockIBCTransferKeeper.

func (*MockIBCTransferKeeperMockRecorder) SendTransfer

func (mr *MockIBCTransferKeeperMockRecorder) SendTransfer(ctx, sourcePort, sourceChannel, token, sender, receiver, timeoutHeight, timeoutTimestamp interface{}) *gomock.Call

SendTransfer indicates an expected call of SendTransfer.

type MockPortKeeper

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

MockPortKeeper is a mock of PortKeeper interface.

func NewMockPortKeeper

func NewMockPortKeeper(ctrl *gomock.Controller) *MockPortKeeper

NewMockPortKeeper creates a new mock instance.

func (*MockPortKeeper) BindPort

func (m *MockPortKeeper) BindPort(ctx types.Context, portID string) *types1.Capability

BindPort mocks base method.

func (*MockPortKeeper) EXPECT

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

type MockPortKeeperMockRecorder

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

MockPortKeeperMockRecorder is the mock recorder for MockPortKeeper.

func (*MockPortKeeperMockRecorder) BindPort

func (mr *MockPortKeeperMockRecorder) BindPort(ctx, portID interface{}) *gomock.Call

BindPort indicates an expected call of BindPort.

type MockScopedKeeper

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

MockScopedKeeper is a mock of ScopedKeeper interface.

func NewMockScopedKeeper

func NewMockScopedKeeper(ctrl *gomock.Controller) *MockScopedKeeper

NewMockScopedKeeper creates a new mock instance.

func (*MockScopedKeeper) AuthenticateCapability

func (m *MockScopedKeeper) AuthenticateCapability(ctx types.Context, cap *types1.Capability, name string) bool

AuthenticateCapability mocks base method.

func (*MockScopedKeeper) ClaimCapability

func (m *MockScopedKeeper) ClaimCapability(ctx types.Context, cap *types1.Capability, name string) error

ClaimCapability mocks base method.

func (*MockScopedKeeper) EXPECT

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

func (*MockScopedKeeper) GetCapability

func (m *MockScopedKeeper) GetCapability(ctx types.Context, name string) (*types1.Capability, bool)

GetCapability mocks base method.

type MockScopedKeeperMockRecorder

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

MockScopedKeeperMockRecorder is the mock recorder for MockScopedKeeper.

func (*MockScopedKeeperMockRecorder) AuthenticateCapability

func (mr *MockScopedKeeperMockRecorder) AuthenticateCapability(ctx, cap, name interface{}) *gomock.Call

AuthenticateCapability indicates an expected call of AuthenticateCapability.

func (*MockScopedKeeperMockRecorder) ClaimCapability

func (mr *MockScopedKeeperMockRecorder) ClaimCapability(ctx, cap, name interface{}) *gomock.Call

ClaimCapability indicates an expected call of ClaimCapability.

func (*MockScopedKeeperMockRecorder) GetCapability

func (mr *MockScopedKeeperMockRecorder) GetCapability(ctx, name interface{}) *gomock.Call

GetCapability indicates an expected call of GetCapability.

type MockSlashingKeeper

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

MockSlashingKeeper is a mock of SlashingKeeper interface.

func NewMockSlashingKeeper

func NewMockSlashingKeeper(ctrl *gomock.Controller) *MockSlashingKeeper

NewMockSlashingKeeper creates a new mock instance.

func (*MockSlashingKeeper) DowntimeJailDuration

func (m *MockSlashingKeeper) DowntimeJailDuration(arg0 types.Context) time.Duration

DowntimeJailDuration mocks base method.

func (*MockSlashingKeeper) EXPECT

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

func (*MockSlashingKeeper) GetValidatorSigningInfo

func (m *MockSlashingKeeper) GetValidatorSigningInfo(ctx types.Context, address types.ConsAddress) (types3.ValidatorSigningInfo, bool)

GetValidatorSigningInfo mocks base method.

func (*MockSlashingKeeper) IsTombstoned

func (m *MockSlashingKeeper) IsTombstoned(arg0 types.Context, arg1 types.ConsAddress) bool

IsTombstoned mocks base method.

func (*MockSlashingKeeper) JailUntil

func (m *MockSlashingKeeper) JailUntil(arg0 types.Context, arg1 types.ConsAddress, arg2 time.Time)

JailUntil mocks base method.

func (*MockSlashingKeeper) SlashFractionDoubleSign

func (m *MockSlashingKeeper) SlashFractionDoubleSign(ctx types.Context) types.Dec

SlashFractionDoubleSign mocks base method.

func (*MockSlashingKeeper) SlashFractionDowntime

func (m *MockSlashingKeeper) SlashFractionDowntime(arg0 types.Context) types.Dec

SlashFractionDowntime mocks base method.

func (*MockSlashingKeeper) Tombstone

func (m *MockSlashingKeeper) Tombstone(arg0 types.Context, arg1 types.ConsAddress)

Tombstone mocks base method.

type MockSlashingKeeperMockRecorder

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

MockSlashingKeeperMockRecorder is the mock recorder for MockSlashingKeeper.

func (*MockSlashingKeeperMockRecorder) DowntimeJailDuration

func (mr *MockSlashingKeeperMockRecorder) DowntimeJailDuration(arg0 interface{}) *gomock.Call

DowntimeJailDuration indicates an expected call of DowntimeJailDuration.

func (*MockSlashingKeeperMockRecorder) GetValidatorSigningInfo

func (mr *MockSlashingKeeperMockRecorder) GetValidatorSigningInfo(ctx, address interface{}) *gomock.Call

GetValidatorSigningInfo indicates an expected call of GetValidatorSigningInfo.

func (*MockSlashingKeeperMockRecorder) IsTombstoned

func (mr *MockSlashingKeeperMockRecorder) IsTombstoned(arg0, arg1 interface{}) *gomock.Call

IsTombstoned indicates an expected call of IsTombstoned.

func (*MockSlashingKeeperMockRecorder) JailUntil

func (mr *MockSlashingKeeperMockRecorder) JailUntil(arg0, arg1, arg2 interface{}) *gomock.Call

JailUntil indicates an expected call of JailUntil.

func (*MockSlashingKeeperMockRecorder) SlashFractionDoubleSign

func (mr *MockSlashingKeeperMockRecorder) SlashFractionDoubleSign(ctx interface{}) *gomock.Call

SlashFractionDoubleSign indicates an expected call of SlashFractionDoubleSign.

func (*MockSlashingKeeperMockRecorder) SlashFractionDowntime

func (mr *MockSlashingKeeperMockRecorder) SlashFractionDowntime(arg0 interface{}) *gomock.Call

SlashFractionDowntime indicates an expected call of SlashFractionDowntime.

func (*MockSlashingKeeperMockRecorder) Tombstone

func (mr *MockSlashingKeeperMockRecorder) Tombstone(arg0, arg1 interface{}) *gomock.Call

Tombstone indicates an expected call of Tombstone.

type MockStakingKeeper

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

MockStakingKeeper is a mock of StakingKeeper interface.

func NewMockStakingKeeper

func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper

NewMockStakingKeeper creates a new mock instance.

func (*MockStakingKeeper) EXPECT

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

func (*MockStakingKeeper) GetLastTotalPower added in v1.0.0

func (m *MockStakingKeeper) GetLastTotalPower(ctx types.Context) types.Int

GetLastTotalPower mocks base method.

func (*MockStakingKeeper) GetLastValidatorPower added in v1.0.0

func (m *MockStakingKeeper) GetLastValidatorPower(ctx types.Context, operator types.ValAddress) int64

GetLastValidatorPower mocks base method.

func (*MockStakingKeeper) GetValidator

func (m *MockStakingKeeper) GetValidator(ctx types.Context, addr types.ValAddress) (types4.Validator, bool)

GetValidator mocks base method.

func (*MockStakingKeeper) GetValidatorByConsAddr

func (m *MockStakingKeeper) GetValidatorByConsAddr(ctx types.Context, consAddr types.ConsAddress) (types4.Validator, bool)

GetValidatorByConsAddr mocks base method.

func (*MockStakingKeeper) GetValidatorUpdates

func (m *MockStakingKeeper) GetValidatorUpdates(ctx types.Context) []types8.ValidatorUpdate

GetValidatorUpdates mocks base method.

func (*MockStakingKeeper) IterateLastValidatorPowers

func (m *MockStakingKeeper) IterateLastValidatorPowers(ctx types.Context, cb func(types.ValAddress, int64) bool)

IterateLastValidatorPowers mocks base method.

func (*MockStakingKeeper) Jail

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

Jail mocks base method.

func (*MockStakingKeeper) PowerReduction

func (m *MockStakingKeeper) PowerReduction(ctx types.Context) types.Int

PowerReduction mocks base method.

func (*MockStakingKeeper) PutUnbondingOnHold

func (m *MockStakingKeeper) PutUnbondingOnHold(ctx types.Context, id uint64) error

PutUnbondingOnHold mocks base method.

func (*MockStakingKeeper) Slash

func (m *MockStakingKeeper) Slash(arg0 types.Context, arg1 types.ConsAddress, arg2, arg3 int64, arg4 types.Dec, arg5 types4.InfractionType)

Slash mocks base method.

func (*MockStakingKeeper) UnbondingCanComplete

func (m *MockStakingKeeper) UnbondingCanComplete(ctx types.Context, id uint64) error

UnbondingCanComplete mocks base method.

func (*MockStakingKeeper) UnbondingTime

func (m *MockStakingKeeper) UnbondingTime(ctx types.Context) time.Duration

UnbondingTime mocks base method.

type MockStakingKeeperMockRecorder

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

MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper.

func (*MockStakingKeeperMockRecorder) GetLastTotalPower added in v1.0.0

func (mr *MockStakingKeeperMockRecorder) GetLastTotalPower(ctx interface{}) *gomock.Call

GetLastTotalPower indicates an expected call of GetLastTotalPower.

func (*MockStakingKeeperMockRecorder) GetLastValidatorPower added in v1.0.0

func (mr *MockStakingKeeperMockRecorder) GetLastValidatorPower(ctx, operator interface{}) *gomock.Call

GetLastValidatorPower indicates an expected call of GetLastValidatorPower.

func (*MockStakingKeeperMockRecorder) GetValidator

func (mr *MockStakingKeeperMockRecorder) GetValidator(ctx, addr interface{}) *gomock.Call

GetValidator indicates an expected call of GetValidator.

func (*MockStakingKeeperMockRecorder) GetValidatorByConsAddr

func (mr *MockStakingKeeperMockRecorder) GetValidatorByConsAddr(ctx, consAddr interface{}) *gomock.Call

GetValidatorByConsAddr indicates an expected call of GetValidatorByConsAddr.

func (*MockStakingKeeperMockRecorder) GetValidatorUpdates

func (mr *MockStakingKeeperMockRecorder) GetValidatorUpdates(ctx interface{}) *gomock.Call

GetValidatorUpdates indicates an expected call of GetValidatorUpdates.

func (*MockStakingKeeperMockRecorder) IterateLastValidatorPowers

func (mr *MockStakingKeeperMockRecorder) IterateLastValidatorPowers(ctx, cb interface{}) *gomock.Call

IterateLastValidatorPowers indicates an expected call of IterateLastValidatorPowers.

func (*MockStakingKeeperMockRecorder) Jail

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

Jail indicates an expected call of Jail.

func (*MockStakingKeeperMockRecorder) PowerReduction

func (mr *MockStakingKeeperMockRecorder) PowerReduction(ctx interface{}) *gomock.Call

PowerReduction indicates an expected call of PowerReduction.

func (*MockStakingKeeperMockRecorder) PutUnbondingOnHold

func (mr *MockStakingKeeperMockRecorder) PutUnbondingOnHold(ctx, id interface{}) *gomock.Call

PutUnbondingOnHold indicates an expected call of PutUnbondingOnHold.

func (*MockStakingKeeperMockRecorder) Slash

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

Slash indicates an expected call of Slash.

func (*MockStakingKeeperMockRecorder) UnbondingCanComplete

func (mr *MockStakingKeeperMockRecorder) UnbondingCanComplete(ctx, id interface{}) *gomock.Call

UnbondingCanComplete indicates an expected call of UnbondingCanComplete.

func (*MockStakingKeeperMockRecorder) UnbondingTime

func (mr *MockStakingKeeperMockRecorder) UnbondingTime(ctx interface{}) *gomock.Call

UnbondingTime indicates an expected call of UnbondingTime.

type MockedKeepers added in v0.2.0

A struct holding pointers to any mocked external keeper needed for provider/consumer keeper setup.

func GetConsumerKeeperAndCtx

func GetConsumerKeeperAndCtx(t *testing.T, params InMemKeeperParams) (
	consumerkeeper.Keeper, sdk.Context, *gomock.Controller, MockedKeepers,
)

Return an in-memory consumer keeper, context, controller, and mocks, given a test instance and parameters.

Note: Calling ctrl.Finish() at the end of a test function ensures that no unexpected calls to external keepers are made.

func GetProviderKeeperAndCtx

func GetProviderKeeperAndCtx(t *testing.T, params InMemKeeperParams) (
	providerkeeper.Keeper, sdk.Context, *gomock.Controller, MockedKeepers,
)

Returns an in-memory provider keeper, context, controller, and mocks, given a test instance and parameters.

Note: Calling ctrl.Finish() at the end of a test function ensures that no unexpected calls to external keepers are made.

func NewMockedKeepers added in v0.2.0

func NewMockedKeepers(ctrl *gomock.Controller) MockedKeepers

NewMockedKeepers instantiates a struct with pointers to properly instantiated mocked keepers.

type PrivateKey

type PrivateKey struct {
	PrivKey cryptotypes.PrivKey
}

Jump to

Keyboard shortcuts

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