Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) DeleteHistoricalInfo(ctx sdk.Context, height int64)
- func (k Keeper) DeleteSequencer(ctx sdk.Context, sequencer stakingtypes.Validator)
- func (k Keeper) GetAllHistoricalInfo(ctx sdk.Context) []stakingtypes.HistoricalInfo
- func (k Keeper) GetAllSequencers(ctx sdk.Context) (sequencers []stakingtypes.Validator)
- func (k Keeper) GetHistoricalInfo(ctx sdk.Context, height int64) (stakingtypes.HistoricalInfo, bool)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetSequencer(ctx sdk.Context, addr sdk.ValAddress) (sequencer stakingtypes.Validator, found bool)
- func (k Keeper) GetSequencerByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (sequencer stakingtypes.Validator, found bool)
- func (k Keeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool)
- func (k Keeper) HistoricalEntries(ctx sdk.Context) (res uint32)
- func (k Keeper) IterateHistoricalInfo(ctx sdk.Context, cb func(stakingtypes.HistoricalInfo) bool)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetDymintSequencers(ctx sdk.Context, sequencers []abci.ValidatorUpdate)
- func (k Keeper) SetHistoricalInfo(ctx sdk.Context, height int64, hi *stakingtypes.HistoricalInfo)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetSequencer(ctx sdk.Context, sequencer stakingtypes.Validator)
- func (k Keeper) SetSequencerByConsAddr(ctx sdk.Context, sequencer stakingtypes.Validator) error
- func (k Keeper) TrackHistoricalInfo(ctx sdk.Context)
- func (k Keeper) UnbondingTime(ctx sdk.Context) (res time.Duration)
- type Querier
- func (k Querier) HistoricalInfo(c context.Context, req *types.QueryHistoricalInfoRequest) (*types.QueryHistoricalInfoResponse, error)
- func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Querier) Sequencer(c context.Context, req *types.QuerySequencerRequest) (*types.QuerySequencerResponse, error)
- func (k Querier) Sequencers(c context.Context, req *types.QuerySequencersRequest) (*types.QuerySequencersResponse, error)
- type StakingKeeper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, ps paramtypes.Subspace, ) *Keeper
func (Keeper) DeleteHistoricalInfo ¶
DeleteHistoricalInfo deletes the historical info at a given height
func (Keeper) DeleteSequencer ¶
func (k Keeper) DeleteSequencer(ctx sdk.Context, sequencer stakingtypes.Validator)
delete the main record holding sequencer details
func (Keeper) GetAllHistoricalInfo ¶
func (k Keeper) GetAllHistoricalInfo(ctx sdk.Context) []stakingtypes.HistoricalInfo
GetAllHistoricalInfo returns all stored HistoricalInfo objects.
func (Keeper) GetAllSequencers ¶
func (k Keeper) GetAllSequencers(ctx sdk.Context) (sequencers []stakingtypes.Validator)
get the set of all sequencers with no limits, used during genesis dump
func (Keeper) GetHistoricalInfo ¶
func (k Keeper) GetHistoricalInfo(ctx sdk.Context, height int64) (stakingtypes.HistoricalInfo, bool)
GetHistoricalInfo gets the historical info at a given height
func (Keeper) GetSequencer ¶
func (k Keeper) GetSequencer(ctx sdk.Context, addr sdk.ValAddress) (sequencer stakingtypes.Validator, found bool)
--------------------------------- GETTERS --------------------------------
get a single sequencer
func (Keeper) GetSequencerByConsAddr ¶
func (k Keeper) GetSequencerByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (sequencer stakingtypes.Validator, found bool)
get a single sequencer by consensus address
func (Keeper) GetValidatorByConsAddr ¶
func (k Keeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool)
---------------------------------- alias ---------------------------------
get a single validator by consensus address
func (Keeper) HistoricalEntries ¶
HistoricalEntries = number of historical info entries to persist in store
func (Keeper) IterateHistoricalInfo ¶
func (k Keeper) IterateHistoricalInfo(ctx sdk.Context, cb func(stakingtypes.HistoricalInfo) bool)
IterateHistoricalInfo provides an interator over all stored HistoricalInfo
objects. For each HistoricalInfo object, cb will be called. If the cb returns
true, the iterator will close and stop.
func (Keeper) SetDymintSequencers ¶
func (k Keeper) SetDymintSequencers(ctx sdk.Context, sequencers []abci.ValidatorUpdate)
set dymint sequencers from InitChain
func (Keeper) SetHistoricalInfo ¶
func (k Keeper) SetHistoricalInfo(ctx sdk.Context, height int64, hi *stakingtypes.HistoricalInfo)
SetHistoricalInfo sets the historical info at a given height
func (Keeper) SetSequencer ¶
func (k Keeper) SetSequencer(ctx sdk.Context, sequencer stakingtypes.Validator)
--------------------------------- SETTERS --------------------------------
set the main record holding sequencer details
func (Keeper) SetSequencerByConsAddr ¶
func (Keeper) TrackHistoricalInfo ¶
TrackHistoricalInfo saves the latest historical-info and deletes the oldest heights that are below pruning height
type Querier ¶
type Querier struct {
Keeper
}
func (Querier) HistoricalInfo ¶
func (k Querier) HistoricalInfo(c context.Context, req *types.QueryHistoricalInfoRequest) (*types.QueryHistoricalInfoResponse, error)
func (Querier) Params ¶
func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Querier) Sequencer ¶
func (k Querier) Sequencer(c context.Context, req *types.QuerySequencerRequest) (*types.QuerySequencerResponse, error)
Sequencer queries sequencer info for given sequencer address.
func (Querier) Sequencers ¶
func (k Querier) Sequencers(c context.Context, req *types.QuerySequencersRequest) (*types.QuerySequencersResponse, error)
Sequencers queries all sequencers that match the given status.
type StakingKeeper ¶
type StakingKeeper interface { GetHistoricalInfo(ctx sdk.Context, height int64) (stakingtypes.HistoricalInfo, bool) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool) UnbondingTime(ctx sdk.Context) time.Duration }
StakingKeeper returns the historical headers kept in store.