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) (height int64, appHash []byte, dirty bool, err error)
- func InitializeMetaStore(ctx context.Context, db sql.DB) error
- func LoadParams(ctx context.Context, db sql.Executor) (*types.NetworkParameters, error)
- func SetChainState(ctx context.Context, db sql.TxMaker, height int64, appHash []byte, dirty bool) error
- func StoreParams(ctx context.Context, db sql.TxMaker, params *types.NetworkParameters) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrParamsNotFound = errors.New("params not found")
Functions ¶
func GetChainState ¶
func GetChainState(ctx context.Context, db sql.Executor) (height int64, appHash []byte, dirty bool, err error)
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 ¶
LoadParams loads the consensus params from the store.
func SetChainState ¶
func SetChainState(ctx context.Context, db sql.TxMaker, height int64, appHash []byte, dirty bool) error
SetChainState will update the current height and app hash.
func StoreParams ¶
StoreParams stores the current consensus params in the store.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.