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) GCBlocks(ctx sdk.Context) uint64
- func (k Keeper) GarbageCollectDowntimes(ctx sdk.Context)
- func (k Keeper) GetDowntime(ctx sdk.Context, height uint64) (time.Duration, bool)
- func (k Keeper) GetLastBlockTime(ctx sdk.Context) (time.Time, bool)
- func (k Keeper) GetParams(ctx sdk.Context) (params v1.Params)
- func (k Keeper) HadDowntimeBetween(ctx sdk.Context, startHeight, endHeight uint64) (bool, time.Duration)
- func (k Keeper) ImportGenesis(ctx sdk.Context, gs *v1.GenesisState) error
- func (k Keeper) IterateDowntimes(ctx sdk.Context, startHeight, endHeight uint64, ...)
- func (k Keeper) IterateGarbageCollections(ctx sdk.Context, onResult func(height, gcBlock uint64) (stop bool))
- func (k Keeper) RecordDowntime(ctx sdk.Context, duration time.Duration)
- func (k Keeper) SetDowntime(ctx sdk.Context, height uint64, duration time.Duration)
- func (k Keeper) SetDowntimeGarbageCollection(ctx sdk.Context, height, gcBlock uint64)
- 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 EpochStorageKeeper interface {
GetParams(ctx sdk.Context) (params epochstoragetypes.Params)
}
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) GCBlocks ¶ added in v0.20.4
GCBlocks returns the number of blocks a downtime should live.
func (Keeper) GarbageCollectDowntimes ¶
GarbageCollectDowntimes will garbage collect downtimes.
func (Keeper) GetDowntime ¶
func (Keeper) GetLastBlockTime ¶
func (Keeper) HadDowntimeBetween ¶ added in v0.20.4
func (k Keeper) HadDowntimeBetween(ctx sdk.Context, startHeight, endHeight uint64) (bool, time.Duration)
HadDowntimeBetween will return true if we had downtimes between the provided heights. The query is inclusive on both ends. The duration returned is the total downtime duration.
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) IterateGarbageCollections ¶ added in v0.20.4
func (Keeper) RecordDowntime ¶
RecordDowntime will record a downtime for the current block
func (Keeper) SetDowntime ¶
func (Keeper) SetDowntimeGarbageCollection ¶ added in v0.20.4
Click to show internal directories.
Click to hide internal directories.