Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetParams(ctx context.Context) (params types.Params)
- func (k Keeper) GetProofWindowCloseHeight(ctx context.Context, queryHeight int64) int64
- func (k Keeper) GetSessionEndHeight(ctx context.Context, queryHeight int64) int64
- func (k Keeper) GetSessionNumber(ctx context.Context, queryHeight int64) int64
- func (k Keeper) GetSessionStartHeight(ctx context.Context, queryHeight int64) int64
- func (k Keeper) Logger() log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetParams(ctx context.Context, params types.Params) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
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 ¶
GetAuthority returns the module's authority.
func (Keeper) GetProofWindowCloseHeight ¶
GetProofWindowCloseHeight returns the block height at which the proof window of the session that includes queryHeight closes, given the passed sharedParams.
func (Keeper) GetSessionEndHeight ¶
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 ¶
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 ¶
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) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)