Documentation ¶
Index ¶
- Variables
- func DumpToFile(ctx sdk.Context, store GlobalStorage, filepath string)
- func ErrFailedToMarshalConsumptionMeta(err error) sdk.Error
- func ErrFailedToMarshalGlobalMeta(err error) sdk.Error
- func ErrFailedToMarshalInflationPool(err error) sdk.Error
- func ErrFailedToMarshalTPS(err error) sdk.Error
- func ErrFailedToMarshalTime(err error) sdk.Error
- func ErrFailedToMarshalTimeEventList(err error) sdk.Error
- func ErrFailedToUnmarshalConsumptionMeta(err error) sdk.Error
- func ErrFailedToUnmarshalGlobalMeta(err error) sdk.Error
- func ErrFailedToUnmarshalInflationPool(err error) sdk.Error
- func ErrFailedToUnmarshalLinoStakeStatistic(err error) sdk.Error
- func ErrFailedToUnmarshalTPS(err error) sdk.Error
- func ErrFailedToUnmarshalTime(err error) sdk.Error
- func ErrFailedToUnmarshalTimeEventList(err error) sdk.Error
- func ErrGlobalConsumptionMetaNotFound() sdk.Error
- func ErrGlobalMetaNotFound() sdk.Error
- func ErrGlobalTPSNotFound() sdk.Error
- func ErrGlobalTimeNotFound() sdk.Error
- func ErrInflationPoolNotFound() sdk.Error
- func ErrLinoStakeStatisticNotFound() sdk.Error
- func GetBCErrorKey() []byte
- func GetEventErrorKey() []byte
- func GetTimeEventListKey(unixTime int64) []byte
- func GetTimeKey() []byte
- func LoadFromFile(ctx sdk.Context, store GlobalStorage, filepath string)
- func NewDumper(store GlobalStorage, options ...testutils.OptionCodec) *testutils.Dumper
- type EventError
- type GlobalStorage
- func (gs GlobalStorage) CanEncode(event types.Event) bool
- func (gs GlobalStorage) GetBCErrors(ctx sdk.Context) []types.BCEventErr
- func (gs GlobalStorage) GetEventErrors(ctx sdk.Context) []EventError
- func (gs GlobalStorage) GetGlobalTime(ctx sdk.Context) *GlobalTime
- func (gs GlobalStorage) GetTimeEventList(ctx sdk.Context, unixTime int64) *types.TimeEventList
- func (gs GlobalStorage) PartialStoreMap(ctx sdk.Context) utils.StoreMap
- func (gs GlobalStorage) RemoveTimeEventList(ctx sdk.Context, unixTime int64)
- func (gs GlobalStorage) SetBCErrors(ctx sdk.Context, errs []types.BCEventErr)
- func (gs GlobalStorage) SetEventErrors(ctx sdk.Context, errs []EventError)
- func (gs GlobalStorage) SetGlobalTime(ctx sdk.Context, globalTime *GlobalTime)
- func (gs GlobalStorage) SetTimeEventList(ctx sdk.Context, unixTime int64, lst *types.TimeEventList)
- type GlobalTablesIR
- type GlobalTime
- type GlobalTimeEventsIR
- type GlobalTimeIR
Constants ¶
This section is empty.
Variables ¶
var ( TimeEventListSubStore = []byte{0x00} // SubStore for time event list TimeSubStore = []byte{0x01} // SubStore for time EventErrorSubStore = []byte{0x02} // SubStore failed events and errors BCErrorSubStore = []byte{0x03} // SubStore failed blockchain event and errors )
Functions ¶
func DumpToFile ¶ added in v0.6.0
func DumpToFile(ctx sdk.Context, store GlobalStorage, filepath string)
func ErrFailedToMarshalConsumptionMeta ¶
ErrFailedToMarshalConsumptionMeta - error if marshal consumption meta failed
func ErrFailedToMarshalGlobalMeta ¶
ErrFailedToMarshalGlobalMeta - error if marshal global meta failed
func ErrFailedToMarshalInflationPool ¶
ErrFailedToMarshalInflationPool - error if marshal inflation pool failed
func ErrFailedToMarshalTPS ¶
ErrFailedToMarshalTPS - error if marshal tps failed
func ErrFailedToMarshalTime ¶
ErrFailedToMarshalTime - error if marshal time failed
func ErrFailedToMarshalTimeEventList ¶
ErrFailedToMarshalTimeEventList - error if marshal time event list failed
func ErrFailedToUnmarshalConsumptionMeta ¶
ErrFailedToUnmarshalConsumptionMeta - error if unmarshal consumption meta failed
func ErrFailedToUnmarshalGlobalMeta ¶
ErrFailedToUnmarshalGlobalMeta - error if unmarshal global meta failed
func ErrFailedToUnmarshalInflationPool ¶
ErrFailedToUnmarshalInflationPool - error if unmarshal inflation pool failed
func ErrFailedToUnmarshalLinoStakeStatistic ¶ added in v0.1.1
ErrFailedToUnmarshalLinoStakeStatistic - error if unmarshal lino power statistic failed
func ErrFailedToUnmarshalTPS ¶
ErrFailedToUnmarshalTPS - error if unmarshal tps failed
func ErrFailedToUnmarshalTime ¶
ErrFailedToUnmarshalTime - error if unmarshal time failed
func ErrFailedToUnmarshalTimeEventList ¶
ErrFailedToUnmarshalTimeEventList - error if unmarshal time event list failed
func ErrGlobalConsumptionMetaNotFound ¶
ErrGlobalConsumptionMetaNotFound - error if global consumption meta is not found in KVStore
func ErrGlobalMetaNotFound ¶
ErrGlobalMetaNotFound - error if global meta not found in KVStore
func ErrGlobalTPSNotFound ¶
ErrGlobalTPSNotFound - error if global tps is not found in KVStore
func ErrGlobalTimeNotFound ¶
ErrGlobalTimeNotFound - error if global time is not found in KVStore
func ErrInflationPoolNotFound ¶
ErrInflationPoolNotFound - error if inflation pool is not found in KVStore
func ErrLinoStakeStatisticNotFound ¶ added in v0.1.1
ErrLinoStakeStatisticNotFound - error if lino power statistic not found in KVStore
func GetBCErrorKey ¶ added in v0.6.0
func GetBCErrorKey() []byte
GetEventErrorKey - "bc event error substore"
func GetEventErrorKey ¶ added in v0.6.0
func GetEventErrorKey() []byte
GetEventErrorKey - "event error substore"
func GetTimeEventListKey ¶
GetTimeEventListKey - get time event list from KVStore
func LoadFromFile ¶ added in v0.6.0
func LoadFromFile(ctx sdk.Context, store GlobalStorage, filepath string)
func NewDumper ¶ added in v0.6.0
func NewDumper(store GlobalStorage, options ...testutils.OptionCodec) *testutils.Dumper
Types ¶
type EventError ¶ added in v0.6.0
type EventError = types.EventError
type GlobalStorage ¶
type GlobalStorage struct {
// contains filtered or unexported fields
}
GlobalStorage - global storage
func NewGlobalStorage ¶
func NewGlobalStorage(key sdk.StoreKey, cdc *wire.Codec) GlobalStorage
NewGlobalStorage - new global storage
func (GlobalStorage) CanEncode ¶ added in v0.6.0
func (gs GlobalStorage) CanEncode(event types.Event) bool
func (GlobalStorage) GetBCErrors ¶ added in v0.6.0
func (gs GlobalStorage) GetBCErrors(ctx sdk.Context) []types.BCEventErr
GetEventErrors - get global time from KVStore
func (GlobalStorage) GetEventErrors ¶ added in v0.6.0
func (gs GlobalStorage) GetEventErrors(ctx sdk.Context) []EventError
GetEventErrors - get global time from KVStore
func (GlobalStorage) GetGlobalTime ¶
func (gs GlobalStorage) GetGlobalTime(ctx sdk.Context) *GlobalTime
GetGlobalTime - get global time from KVStore
func (GlobalStorage) GetTimeEventList ¶
func (gs GlobalStorage) GetTimeEventList(ctx sdk.Context, unixTime int64) *types.TimeEventList
GetTimeEventList - get time event list at given unix time
func (GlobalStorage) PartialStoreMap ¶ added in v0.4.0
func (gs GlobalStorage) PartialStoreMap(ctx sdk.Context) utils.StoreMap
func (GlobalStorage) RemoveTimeEventList ¶
func (gs GlobalStorage) RemoveTimeEventList(ctx sdk.Context, unixTime int64)
RemoveTimeEventList - remove time event list at given unix time
func (GlobalStorage) SetBCErrors ¶ added in v0.6.0
func (gs GlobalStorage) SetBCErrors(ctx sdk.Context, errs []types.BCEventErr)
SetGlobalTime - set global time to KVStore
func (GlobalStorage) SetEventErrors ¶ added in v0.6.0
func (gs GlobalStorage) SetEventErrors(ctx sdk.Context, errs []EventError)
SetGlobalTime - set global time to KVStore
func (GlobalStorage) SetGlobalTime ¶
func (gs GlobalStorage) SetGlobalTime(ctx sdk.Context, globalTime *GlobalTime)
SetGlobalTime - set global time to KVStore
func (GlobalStorage) SetTimeEventList ¶
func (gs GlobalStorage) SetTimeEventList(ctx sdk.Context, unixTime int64, lst *types.TimeEventList)
SetTimeEventList - set time event list at given unix time
type GlobalTablesIR ¶ added in v0.2.0
type GlobalTablesIR struct { Version int `json:"version"` GlobalTimeEventLists []GlobalTimeEventsIR `json:"global_time_event_lists"` Time GlobalTimeIR `json:"time"` }
GlobalTablesIR - state
type GlobalTime ¶
type GlobalTime struct { ChainStartTime int64 `json:"chain_start_time"` LastBlockTime int64 `json:"last_block_time"` PastMinutes int64 `json:"past_minutes"` }
GlobalTime - global time
type GlobalTimeEventsIR ¶ added in v0.4.0
type GlobalTimeEventsIR struct { UnixTime int64 `json:"unix_time"` TimeEventList types.TimeEventList `json:"time_event_list"` }
GlobalTimeEventsIR - events, pk: UnixTime
type GlobalTimeIR ¶ added in v0.4.0
type GlobalTimeIR struct { ChainStartTime int64 `json:"chain_start_time"` LastBlockTime int64 `json:"last_block_time"` PastMinutes int64 `json:"past_minutes"` }
GlobalTimeIR - global time