cosmos-sdk: github.com/cosmos/cosmos-sdk/store/gaskv Index | Files

package gaskv

import "github.com/cosmos/cosmos-sdk/store/gaskv"

Index

Package Files

store.go

type Store Uses

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

Store applies gas tracking to an underlying KVStore. It implements the KVStore interface.

func NewStore Uses

func NewStore(parent types.KVStore, gasMeter types.GasMeter, gasConfig types.GasConfig) *Store

NewStore returns a reference to a new GasKVStore. nolint

func (*Store) CacheWrap Uses

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

Implements KVStore.

func (*Store) CacheWrapWithTrace Uses

func (gs *Store) CacheWrapWithTrace(_ io.Writer, _ types.TraceContext) types.CacheWrap

CacheWrapWithTrace implements the KVStore interface.

func (*Store) Delete Uses

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

Implements KVStore.

func (*Store) Get Uses

func (gs *Store) Get(key []byte) (value []byte)

Implements KVStore.

func (*Store) GetStoreType Uses

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

Implements Store.

func (*Store) Has Uses

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

Implements KVStore.

func (*Store) Iterator Uses

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

Iterator implements the KVStore interface. It returns an iterator which incurs a flat gas cost for seeking to the first key/value pair and a variable gas cost based on the current value's length if the iterator is valid.

func (*Store) ReverseIterator Uses

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

ReverseIterator implements the KVStore interface. It returns a reverse iterator which incurs a flat gas cost for seeking to the first key/value pair and a variable gas cost based on the current value's length if the iterator is valid.

func (*Store) Set Uses

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

Implements KVStore.

Package gaskv imports 2 packages (graph) and is imported by 9 packages. Updated 2019-09-20. Refresh now. Tools for package owners.