gaskv

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 applies gas tracking to an underlying KVStore. It implements the KVStore interface.

func NewStore

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

NewStore returns a reference to a new GasKVStore. nolint

func (*Store) CacheWrap

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

Implements KVStore.

func (*Store) CacheWrapWithTrace

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

CacheWrapWithTrace implements the KVStore interface.

func (*Store) Delete

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

Implements KVStore.

func (*Store) Get

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

Implements KVStore.

func (*Store) GetStoreType

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

Implements Store.

func (*Store) Has

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

Implements KVStore.

func (*Store) Iterator

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

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

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

Implements KVStore.

Jump to

Keyboard shortcuts

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