Documentation ¶
Overview ¶
Package meta defines a chain metadata store for the ABCI application. Prior to using the methods, the tables should be initialized and updated to the latest schema version with InitializeMetaStore.
Index ¶
- Variables
- func GetChainState(ctx context.Context, db sql.Executor) (int64, []byte, error)
- func InitializeMetaStore(ctx context.Context, db sql.DB) error
- func LoadParams(ctx context.Context, db sql.Executor) (*common.NetworkParameters, error)
- func SetChainState(ctx context.Context, db sql.TxMaker, height int64, appHash []byte) error
- func StoreDiff(ctx context.Context, db sql.TxMaker, original, new *common.NetworkParameters) error
- func StoreParams(ctx context.Context, db sql.TxMaker, params *common.NetworkParameters) error
Constants ¶
This section is empty.
Variables ¶
var ErrParamsNotFound = errors.New("params not found")
Functions ¶
func GetChainState ¶
GetChainState returns height and app hash from the chain state store. If there is no recorded data, height will be -1 and app hash nil.
func InitializeMetaStore ¶
InitializeMetaStore initializes the chain metadata store schema.
func LoadParams ¶ added in v0.9.0
LoadParams loads the consensus params from the store.
func SetChainState ¶
SetChainState will update the current height and app hash.
func StoreDiff ¶ added in v0.9.0
StoreDiff stores the difference between two sets of consensus params. If the parameters are equal, no action is taken.
func StoreParams ¶ added in v0.9.0
StoreParams stores the consensus params in the store.
Types ¶
This section is empty.