Documentation ¶
Index ¶
- Constants
- Variables
- func ActionStoreKey(epochNumber int64, actionID uint64) []byte
- type Keeper
- func (k Keeper) DeleteByKey(ctx sdk.Context, key []byte)
- func (k Keeper) DequeueEpochActions(ctx sdk.Context)
- func (k Keeper) GetEpochActionByIterator(iterator db.Iterator) sdk.Msg
- func (k Keeper) GetEpochActions(ctx sdk.Context) []sdk.Msg
- func (k Keeper) GetEpochActionsIterator(ctx sdk.Context) db.Iterator
- func (k Keeper) GetEpochMsg(ctx sdk.Context, epochNumber int64, actionID uint64) sdk.Msg
- func (k Keeper) GetEpochNumber(ctx sdk.Context) int64
- func (k Keeper) GetNewActionID(ctx sdk.Context) uint64
- func (k Keeper) GetNextEpochHeight(ctx sdk.Context, epochInterval int64) int64
- func (k Keeper) GetNextEpochTime(ctx sdk.Context, epochInterval int64) time.Time
- func (k Keeper) IncreaseEpochNumber(ctx sdk.Context)
- func (k Keeper) QueueMsgForEpoch(ctx sdk.Context, epochNumber int64, msg sdk.Msg)
- func (k Keeper) RestoreEpochAction(ctx sdk.Context, epochNumber int64, action *codectypes.Any)
- func (k Keeper) SetEpochNumber(ctx sdk.Context, epochNumber int64)
Constants ¶
const ( DefaultEpochActionID = 1 DefaultEpochNumber = 0 )
Variables ¶
var ( NextEpochActionID = []byte{0x11} EpochNumberID = []byte{0x12} EpochActionQueuePrefix = []byte{0x13} // prefix for the epoch )
Functions ¶
func ActionStoreKey ¶
ActionStoreKey returns action store key from ID
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the store
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, commitTimeout time.Duration) Keeper
NewKeeper creates a epoch queue manager
func (Keeper) DeleteByKey ¶
DeleteByKey delete item by key
func (Keeper) DequeueEpochActions ¶
DequeueEpochActions dequeue all the actions store on epoch
func (Keeper) GetEpochActionByIterator ¶
GetEpochActionByIterator get action by iterator
func (Keeper) GetEpochActions ¶
GetEpochActions get all actions
func (Keeper) GetEpochActionsIterator ¶
GetEpochActionsIterator returns iterator for EpochActions
func (Keeper) GetEpochMsg ¶
GetEpochMsg gets a msg by ID
func (Keeper) GetEpochNumber ¶
GetEpochNumber fetches epoch number
func (Keeper) GetNewActionID ¶
GetNewActionID returns ID to be used for next epoch
func (Keeper) GetNextEpochHeight ¶
GetNextEpochHeight returns next epoch block height
func (Keeper) GetNextEpochTime ¶
GetNextEpochTime returns estimated next epoch time
func (Keeper) IncreaseEpochNumber ¶
IncreaseEpochNumber increases epoch number
func (Keeper) QueueMsgForEpoch ¶
QueueMsgForEpoch save the actions that need to be executed on next epoch
func (Keeper) RestoreEpochAction ¶
RestoreEpochAction restore the actions that need to be executed on next epoch