Documentation ¶
Index ¶
- func NewQueryServer(k Keeper) v1.QueryServer
- type EpochStorageKeeper
- type Keeper
- func (k Keeper) BeginBlock(ctx sdk.Context)
- func (k Keeper) DeleteDowntime(ctx sdk.Context, height uint64)
- func (k Keeper) ExportGenesis(ctx sdk.Context) (*v1.GenesisState, error)
- func (k Keeper) GarbageCollectDowntimes(ctx sdk.Context)
- func (k Keeper) GetDowntime(ctx sdk.Context, epochStartBlock uint64) (time.Duration, bool)
- func (k Keeper) GetDowntimeFactor(ctx sdk.Context, epoch uint64) uint64
- func (k Keeper) GetLastBlockTime(ctx sdk.Context) (time.Time, bool)
- func (k Keeper) GetParams(ctx sdk.Context) (params v1.Params)
- func (k Keeper) ImportGenesis(ctx sdk.Context, gs *v1.GenesisState) error
- func (k Keeper) IterateDowntimes(ctx sdk.Context, startHeight, endHeight uint64, ...)
- func (k Keeper) RecordDowntime(ctx sdk.Context, duration time.Duration)
- func (k Keeper) SetDowntime(ctx sdk.Context, epochStartBlock uint64, duration time.Duration)
- func (k Keeper) SetLastBlockTime(ctx sdk.Context, t time.Time)
- func (k Keeper) SetParams(ctx sdk.Context, params v1.Params)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQueryServer ¶
func NewQueryServer(k Keeper) v1.QueryServer
Types ¶
type EpochStorageKeeper ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, sk storetypes.StoreKey, ps paramtypes.Subspace, esk EpochStorageKeeper) Keeper
func (Keeper) BeginBlock ¶
func (Keeper) ExportGenesis ¶
func (Keeper) GarbageCollectDowntimes ¶
GarbageCollectDowntimes will garbage collect downtimes.
func (Keeper) GetDowntime ¶
func (Keeper) GetDowntimeFactor ¶
func (Keeper) GetLastBlockTime ¶
func (Keeper) ImportGenesis ¶
func (Keeper) IterateDowntimes ¶
func (k Keeper) IterateDowntimes(ctx sdk.Context, startHeight, endHeight uint64, onResult func(height uint64, duration time.Duration) (stop bool))
IterateDowntimes will iterate over all downtimes between the provided heights, it is inclusive on both ends. Will stop iteration when the callback returns true.
func (Keeper) RecordDowntime ¶
RecordDowntime will record a downtime for the current block
func (Keeper) SetDowntime ¶
Click to show internal directories.
Click to hide internal directories.