memiavlstore

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store Implements types.KVStore and CommitKVStore.

func New

func New(tree *memiavl.Tree, logger log.Logger) *Store

func (*Store) CacheWrap

func (st *Store) CacheWrap() types.CacheWrap

func (*Store) CacheWrapWithTrace

func (st *Store) CacheWrapWithTrace(w io.Writer, tc types.TraceContext) types.CacheWrap

CacheWrapWithTrace implements the Store interface.

func (*Store) Commit

func (st *Store) Commit() types.CommitID

func (*Store) Delete

func (st *Store) Delete(key []byte)

Implements types.KVStore.

we assume Delete is only called in `Commit`, so the written state is only visible after commit.

func (*Store) Get

func (st *Store) Get(key []byte) []byte

Implements types.KVStore.

func (*Store) GetPruning

func (st *Store) GetPruning() pruningtypes.PruningOptions

SetPruning panics as pruning options should be provided at initialization since IAVl accepts pruning options directly.

func (*Store) GetStoreType

func (st *Store) GetStoreType() types.StoreType

Implements Store.

func (*Store) Has

func (st *Store) Has(key []byte) bool

Implements types.KVStore.

func (*Store) Iterator

func (st *Store) Iterator(start, end []byte) types.Iterator

func (*Store) LastCommitID

func (st *Store) LastCommitID() types.CommitID

func (*Store) PopChangeSet

func (st *Store) PopChangeSet() iavl.ChangeSet

PopChangeSet returns the change set and clear it

func (*Store) Query

func (st *Store) Query(req abci.RequestQuery) (res abci.ResponseQuery)

func (*Store) ReverseIterator

func (st *Store) ReverseIterator(start, end []byte) types.Iterator

func (*Store) Set

func (st *Store) Set(key, value []byte)

Implements types.KVStore.

we assume Set is only called in `Commit`, so the written state is only visible after commit.

func (*Store) SetInitialVersion

func (st *Store) SetInitialVersion(version int64)

SetInitialVersion sets the initial version of the IAVL tree. It is used when starting a new chain at an arbitrary height. implements interface StoreWithInitialVersion

func (*Store) SetPruning

func (st *Store) SetPruning(_ pruningtypes.PruningOptions)

SetPruning panics as pruning options should be provided at initialization since IAVl accepts pruning options directly.

func (*Store) SetTree added in v0.0.6

func (st *Store) SetTree(tree *memiavl.Tree)

Jump to

Keyboard shortcuts

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