gas

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0, UNKNOWN not legal advice Imports: 0 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 applies gas tracking to an underlying Store. It implements the Store interface.

func New

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

New returns a reference to a new GasStore.

func (*Store) CacheWrap

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

Implements Store.

func (*Store) Delete

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

Implements Store.

func (*Store) Flush

func (gs *Store) Flush()

func (*Store) Get

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

Implements Store.

func (*Store) Has

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

Implements Store.

func (*Store) Iterator

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

Iterator implements the Store 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) Print

func (gs *Store) Print()

func (*Store) ReverseIterator

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

ReverseIterator implements the Store 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 Store.

func (*Store) Write

func (gs *Store) Write()

Implements Store.

Jump to

Keyboard shortcuts

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