storage

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: LGPL-3.0 Imports: 3 Imported by: 0 modules, 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 CacheDB

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

CacheDB is smart contract execute cache, it contain transaction cache and block cache When smart contract execute finish, need to commit transaction cache to block cache

func NewCacheDB

func NewCacheDB(store *overlaydb.OverlayDB) *CacheDB

NewCacheDB return a new contract cache

func (*CacheDB) Commit

func (self *CacheDB) Commit()

Commit current transaction cache to block cache

func (*CacheDB) Delete

func (self *CacheDB) Delete(key []byte)

func (*CacheDB) Get

func (self *CacheDB) Get(key []byte) ([]byte, error)

func (*CacheDB) NewIterator

func (self *CacheDB) NewIterator(key []byte) common.StoreIterator

func (*CacheDB) Put

func (self *CacheDB) Put(key []byte, value []byte)

func (*CacheDB) Reset

func (self *CacheDB) Reset()

type Iter

type Iter struct {
	*overlaydb.JoinIter
}

func (*Iter) Key

func (self *Iter) Key() []byte

Jump to

Keyboard shortcuts

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