kvstore

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidatorPrefix        = "val="
	AppVersion      uint64 = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	types.BaseApplication
	// contains filtered or unexported fields
}

Application is the kvstore state machine. It complies with the abci.Application interface. It takes transactions in the form of key=value and saves them in a database. This is a somewhat trivial example as there is no real state execution

func NewApplication

func NewApplication(db dbm.DB) *Application

NewApplication creates an instance of the kvstore from the provided database

func NewInMemoryApplication

func NewInMemoryApplication() *Application

NewInMemoryApplication creates a new application from an in memory database. Nothing will be persisted.

func NewPersistentApplication

func NewPersistentApplication(dbDir string) *Application

NewPersistentApplication creates a new application using the goleveldb database engine

func (*Application) Close

func (app *Application) Close() error

func (*Application) Info

Info returns information about the state of the application. This is generally used everytime a Tendermint instance begins and let's the application know what Tendermint versions it's interacting with. Based from this information, Tendermint will ensure it is in sync with the application by potentially replaying the blocks it has. If the Application returns a 0 appBlockHeight, Tendermint will call InitChain to initialize the application with consensus related data

func (*Application) ProcessDVSRequest

func (*Application) ProcessDVSResponse

func (*Application) Query

func (app *Application) Query(_ context.Context, reqQuery *types.RequestQuery) (*types.ResponseQuery, error)

Returns an associated value or nil if missing.

type State

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

Jump to

Keyboard shortcuts

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