memiavlstore

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 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(k types.StoreKey) types.CacheWrap

func (*Store) CacheWrapWithListeners

func (st *Store) CacheWrapWithListeners(k types.StoreKey, listeners []types.WriteListener) types.CacheWrap

func (*Store) CacheWrapWithTrace

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

CacheWrapWithTrace implements the Store interface.

func (*Store) Commit

func (st *Store) Commit(_ bool) 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() types.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) GetWorkingHash

func (st *Store) GetWorkingHash() ([]byte, error)

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(_ types.PruningOptions)

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

Jump to

Keyboard shortcuts

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