keeper

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 11 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 {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeService store.KVStoreService,
	logger log.Logger,
	authority string,

) Keeper

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the module's authority.

func (Keeper) GetParams

func (k Keeper) GetParams(ctx context.Context) (params types.Params)

GetParams get all parameters as types.Params

func (Keeper) GetProofWindowCloseHeight

func (k Keeper) GetProofWindowCloseHeight(ctx context.Context, queryHeight int64) int64

GetProofWindowCloseHeight returns the block height at which the proof window of the session that includes queryHeight closes, given the passed sharedParams.

func (Keeper) GetSessionEndHeight

func (k Keeper) GetSessionEndHeight(ctx context.Context, queryHeight int64) int64

GetSessionEndHeight returns the block height at which the session containing queryHeight ends, given the current shared on-chain parameters. Returns 0 if the block height is not a consensus produced block. Example: If NumBlocksPerSession == 4, sessions end at blocks 4, 8, 11, etc.

func (Keeper) GetSessionNumber

func (k Keeper) GetSessionNumber(ctx context.Context, queryHeight int64) int64

GetSessionNumber returns the session number for the session containing queryHeight, given the current shared on-chain parameters. Returns session number 0 if the block height is not a consensus produced block. Returns session number 1 for block 1 to block NumBlocksPerSession - 1 (inclusive). i.e. If NubBlocksPerSession == 4, session == 1 for [1, 4], session == 2 for [5, 8], etc.

func (Keeper) GetSessionStartHeight

func (k Keeper) GetSessionStartHeight(ctx context.Context, queryHeight int64) int64

GetSessionStartHeight returns the block height at which the session containing queryHeight starts, given the current shared on-chain parameters. Returns 0 if the block height is not a consensus produced block. Example: If NumBlocksPerSession == 4, sessions start at blocks 1, 5, 9, etc.

func (Keeper) Logger

func (k Keeper) Logger() log.Logger

Logger returns a module-specific logger.

func (Keeper) Params

func (Keeper) SetParams

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

SetParams set the params

Jump to

Keyboard shortcuts

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