meta

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 9 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) (int64, []byte, 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 added in v0.9.0

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

LoadParams loads the consensus params from the store.

func SetChainState

func SetChainState(ctx context.Context, db sql.TxMaker, height int64, appHash []byte) error

SetChainState will update the current height and app hash.

func StoreDiff added in v0.9.0

func StoreDiff(ctx context.Context, db sql.TxMaker, original, new *common.NetworkParameters) error

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

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

StoreParams stores the 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