Documentation ¶
Index ¶
- Constants
- func DefaultGenesis() *types.GenesisState
- func FixationVersion() uint64
- type AppModule
- type AppModuleBasic
- func (a AppModuleBasic) GetQueryCmd() *cobra.Command
- func (a AppModuleBasic) GetTxCmd() *cobra.Command
- func (a AppModuleBasic) Name() string
- func (a AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux)
- func (a AppModuleBasic) RegisterInterfaces(_ cdctypes.InterfaceRegistry)
- func (a AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino)
- type FixationStore
- func (fs FixationStore) AllEntryIndicesFilter(ctx sdk.Context, prefix string, filter func(k, v []byte) bool) []string
- func (fs *FixationStore) AppendEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) error
- func (fs *FixationStore) DelEntry(ctx sdk.Context, index string, block uint64) error
- func (fs *FixationStore) Export(ctx sdk.Context) types.GenesisState
- func (fs *FixationStore) FindEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) bool
- func (fs *FixationStore) FindEntry2(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) (uint64, bool)
- func (fs FixationStore) GetAllEntryIndices(ctx sdk.Context) []string
- func (fs FixationStore) GetAllEntryIndicesWithPrefix(ctx sdk.Context, prefix string) []string
- func (fs *FixationStore) GetAllEntryVersions(ctx sdk.Context, index string) (blocks []uint64)
- func (fs *FixationStore) GetEntry(ctx sdk.Context, index string, entryData codec.ProtoMarshaler) bool
- func (fs *FixationStore) GetEntryVersionsRange(ctx sdk.Context, index string, block, delta uint64) (blocks []uint64)
- func (fs *FixationStore) HasEntry(ctx sdk.Context, index string, block uint64) bool
- func (fs *FixationStore) Init(ctx sdk.Context, gs types.GenesisState)
- func (fs *FixationStore) IsEntryStale(ctx sdk.Context, index string, block uint64) bool
- func (fs *FixationStore) MigrateVersion(ctx sdk.Context) (err error)
- func (fs *FixationStore) MigrateVersionAndPrefix(ctx sdk.Context, oldPrefix string) (err error)
- func (fs *FixationStore) ModifyEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler)
- func (fs *FixationStore) PutEntry(ctx sdk.Context, index string, block uint64)
- func (fs *FixationStore) ReadEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler)
- type Keeper
Constants ¶
const (
ConsensusVersion = 1
)
const (
ModuleName = "fixationstore"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultGenesis ¶ added in v0.25.0
func DefaultGenesis() *types.GenesisState
func FixationVersion ¶ added in v0.25.0
func FixationVersion() uint64
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
func NewAppModule ¶
func (AppModule) BeginBlock ¶
func (a AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)
func (AppModule) ConsensusVersion ¶
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic implements the module.AppModuleBasic interface for the downtime module.
func (AppModuleBasic) GetQueryCmd ¶
func (a AppModuleBasic) GetQueryCmd() *cobra.Command
func (AppModuleBasic) GetTxCmd ¶
func (a AppModuleBasic) GetTxCmd() *cobra.Command
func (AppModuleBasic) Name ¶
func (a AppModuleBasic) Name() string
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (a AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.ServeMux)
func (AppModuleBasic) RegisterInterfaces ¶
func (a AppModuleBasic) RegisterInterfaces(_ cdctypes.InterfaceRegistry)
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (a AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino)
type FixationStore ¶ added in v0.25.0
type FixationStore struct {
// contains filtered or unexported fields
}
func NewFixationStore ¶ added in v0.25.0
func NewFixationStore(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, prefix string, tstore *timerstore.TimerStore) *FixationStore
NewFixationStore returns a new FixationStore object
func (FixationStore) AllEntryIndicesFilter ¶ added in v0.25.0
func (fs FixationStore) AllEntryIndicesFilter(ctx sdk.Context, prefix string, filter func(k, v []byte) bool) []string
AllEntryIndicesFilter returns all Entry indices with a given prefix and filtered by the given filter function.
func (*FixationStore) AppendEntry ¶ added in v0.25.0
func (fs *FixationStore) AppendEntry( ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler, ) error
AppendEntry adds a new entry to the store
func (*FixationStore) DelEntry ¶ added in v0.25.0
DelEntry marks the entry for deletion so that future GetEntry will not find it anymore. (Cleanup of the EntryIndex is done when the last reference is removed).
func (*FixationStore) Export ¶ added in v0.25.0
func (fs *FixationStore) Export(ctx sdk.Context) types.GenesisState
func (*FixationStore) FindEntry ¶ added in v0.25.0
func (fs *FixationStore) FindEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) bool
FindEntry returns the entry by index and block without changing the refcount
func (*FixationStore) FindEntry2 ¶ added in v0.25.0
func (fs *FixationStore) FindEntry2(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler) (uint64, bool)
FindEntry2 returns the entry by index and block without changing the refcount
func (FixationStore) GetAllEntryIndices ¶ added in v0.25.0
func (fs FixationStore) GetAllEntryIndices(ctx sdk.Context) []string
GetAllEntryIndices returns all Entry indices
func (FixationStore) GetAllEntryIndicesWithPrefix ¶ added in v0.25.0
func (fs FixationStore) GetAllEntryIndicesWithPrefix(ctx sdk.Context, prefix string) []string
GetAllEntryIndicesWithPrefix returns all Entry indices with a given prefix
func (*FixationStore) GetAllEntryVersions ¶ added in v0.25.0
func (fs *FixationStore) GetAllEntryVersions(ctx sdk.Context, index string) (blocks []uint64)
GetAllEntryVersions returns a list of all versions (blocks) of an entry, for use in testing and migrations (includes stale and deleted entry versions).
func (*FixationStore) GetEntry ¶ added in v0.25.0
func (fs *FixationStore) GetEntry(ctx sdk.Context, index string, entryData codec.ProtoMarshaler) bool
GetEntry returns the latest entry by index and increments the refcount (while ignoring entries in stale-period)
func (*FixationStore) GetEntryVersionsRange ¶ added in v0.25.0
func (fs *FixationStore) GetEntryVersionsRange(ctx sdk.Context, index string, block, delta uint64) (blocks []uint64)
GetEntryVersionsRange returns a list of versions from nearest-no-later block and onward, and not more than delta blocks further (skip stale entries).
func (*FixationStore) HasEntry ¶ added in v0.25.0
HasEntry returns true if an entry version exists for the given index, block tuple (any kind of entry, even deleted or stale).
func (*FixationStore) Init ¶ added in v0.25.0
func (fs *FixationStore) Init(ctx sdk.Context, gs types.GenesisState)
func (*FixationStore) IsEntryStale ¶ added in v0.25.0
IsEntryStale returns true if an entry version exists and is stale.
func (*FixationStore) MigrateVersion ¶ added in v0.25.0
func (fs *FixationStore) MigrateVersion(ctx sdk.Context) (err error)
MigrateVerrsion performs pending internal version migration(s), if any.
func (*FixationStore) MigrateVersionAndPrefix ¶ added in v0.25.0
func (fs *FixationStore) MigrateVersionAndPrefix(ctx sdk.Context, oldPrefix string) (err error)
MigrateVersionAndPrefix performs pending internal version migration(s), if any, and then replaces the old prefix with a new (current) one. (For the version migration(s) it uses the old prefix).
func (*FixationStore) ModifyEntry ¶ added in v0.25.0
func (fs *FixationStore) ModifyEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler)
ModifyEntry modifies an existing entry in the store (should be called only for existing entries; will panic otherwise)
func (*FixationStore) PutEntry ¶ added in v0.25.0
func (fs *FixationStore) PutEntry(ctx sdk.Context, index string, block uint64)
PutEntry finds the entry by index and block and decrements the refcount (should be called only for existing entries; will panic otherwise)
func (*FixationStore) ReadEntry ¶ added in v0.25.0
func (fs *FixationStore) ReadEntry(ctx sdk.Context, index string, block uint64, entryData codec.ProtoMarshaler)
ReadEntry returns and existing entry with index and specific block (should be called only for existing entries; will panic otherwise)
type Keeper ¶ added in v0.24.1
type Keeper struct {
// contains filtered or unexported fields
}
Keeper is the fixationstore keeper. The keeper retains all the fixation stores used by modules, it also manages their lifecycle.
func NewKeeper ¶ added in v0.24.1
func NewKeeper(cdc codec.BinaryCodec, tsKeeper *timerstore.Keeper) *Keeper
func (*Keeper) BeginBlock ¶ added in v0.24.1
func (*Keeper) NewFixationStore ¶ added in v0.24.1
func (k *Keeper) NewFixationStore(storeKey storetypes.StoreKey, prefix string) *FixationStore