store

package
v1.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestingStateFixture

func TestingStateFixture() *state.State

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store wraps a datastore with ABCI-specific functionality

func NewExecABCIStore

func NewExecABCIStore(store ds.Batching) *Store

NewExecABCIStore creates a new Store with the ABCI prefix. The data is stored under ev-node database and not in the app's database.

func (*Store) GetBlockID

func (s *Store) GetBlockID(ctx context.Context, height uint64) (*cmttypes.BlockID, error)

GetBlockID loads the block ID from disk for a specific height.

func (*Store) GetBlockResponse

func (s *Store) GetBlockResponse(ctx context.Context, height uint64) (*abci.ResponseFinalizeBlock, error)

GetBlockResponse loads the block response from disk for a specific height If the block response does not exist, it returns an error.

func (*Store) LoadState

func (s *Store) LoadState(ctx context.Context) (*cmtstate.State, error)

LoadState loads the state from disk. When the state does not exist, it returns an empty state.

func (*Store) SaveBlockID

func (s *Store) SaveBlockID(ctx context.Context, height uint64, blockID *cmttypes.BlockID) error

SaveBlockID saves the block ID to disk per height. This is used to store the block ID for the block execution

func (*Store) SaveBlockResponse

func (s *Store) SaveBlockResponse(ctx context.Context, height uint64, resp *abci.ResponseFinalizeBlock) error

SaveBlockResponse saves the block response to disk per height This is used to store the results of the block execution so that they can be retrieved later, e.g., for querying transaction results.

func (*Store) SaveState

func (s *Store) SaveState(ctx context.Context, state *cmtstate.State) error

SaveState saves the state to disk

Jump to

Keyboard shortcuts

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