keeper

package
v1.15.7 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	AddressCodec address.Codec
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey corestore.KVStoreService,
	ps paramtypes.Subspace,
	slashing types.SlashingKeeper,
	staking types.StakingKeeper,
	addressCodec address.Codec,
) Keeper

func (Keeper) GetMessageNonceCache

func (k Keeper) GetMessageNonceCache(ctx context.Context) (*types.HistoricRelayData, error)

GetMessageNonceCache returns the cached historic relay data. This data is used to keep track of the message nonce's across validators to prevent replay attacks. It will return nil if no cached data is found.

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

GetParams get all parameters as types.Params

func (Keeper) GetValidatorHistory

func (k Keeper) GetValidatorHistory(ctx context.Context, address sdk.ValAddress) (*types.ValidatorHistory, error)

GetValidatorHistory returns the historic relay data for a validator. Will return nil if no history found for the given validator address.

func (Keeper) GetValidatorMetrics

func (k Keeper) GetValidatorMetrics(ctx context.Context, address sdk.ValAddress) (*types.ValidatorMetrics, error)

GetValidatorMetrics returns the metrics for a validator. Will return nil if no metrics found for the given validator address.

func (Keeper) HistoricRelayData

HistoricRelayData implements types.QueryServer.

func (Keeper) Logger

func (k Keeper) Logger(ctx context.Context) log.Logger

func (Keeper) OnConsensusMessageAttested

func (k Keeper) OnConsensusMessageAttested(goCtx context.Context, e types.MessageAttestedEvent)

OnConsensusMessageAttested implements types.OnConsensusMessageAttestedListener.

func (Keeper) OnSnapshotBuilt

func (k Keeper) OnSnapshotBuilt(ctx context.Context, snapshot *valsettypes.Snapshot)

OnSnapshotBuilt implements types.OnSnapshotBuiltListener.

func (Keeper) Params

func (*Keeper) PurgeRelayMetrics

func (k *Keeper) PurgeRelayMetrics(ctx context.Context)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (*Keeper) UpdateRelayMetrics

func (k *Keeper) UpdateRelayMetrics(ctx context.Context)

func (*Keeper) UpdateUptime

func (k *Keeper) UpdateUptime(ctx context.Context)

func (Keeper) Validator

Validator implements types.QueryServer.

func (Keeper) Validators

func (k Keeper) Validators(goCtx context.Context, _ *types.Empty) (*types.QueryValidatorsResponse, error)

Validators implements types.QueryServer.

Jump to

Keyboard shortcuts

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