meta

package
v0.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

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

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

func InitializeMetaStore(ctx context.Context, db sql.DB) error

InitializeMetaStore initializes the chain metadata store schema.

func LoadParams

func LoadParams(ctx context.Context, db sql.Executor) (*types.NetworkParameters, error)

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

func StoreParams(ctx context.Context, db sql.TxMaker, params *types.NetworkParameters) error

StoreParams stores the current consensus params in the store.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL