types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKvDB

func CreateKvDB(name string, backend BackendType, dir string) (ethdb.KeyValueStore, error)

func Keccak256HashWithSyncPool

func Keccak256HashWithSyncPool(data ...[]byte) (h ethcmn.Hash)

func NewMptLevelDB

func NewMptLevelDB(name string, dir string) (ethdb.KeyValueStore, error)

func NewMptMemDB

func NewMptMemDB(name string, dir string) (ethdb.KeyValueStore, error)

Types

type BackendType

type BackendType string

------------------------------------------

const (
	// GoLevelDBBackend represents goleveldb (github.com/syndtr/goleveldb - most
	// popular implementation)
	//   - pure go
	//   - stable
	GoLevelDBBackend BackendType = "goleveldb"

	// RocksDBBackend represents rocksdb (uses github.com/cosmos/gorocksdb)
	//   - EXPERIMENTAL
	//   - requires gcc
	//   - use rocksdb build tag (go build -tags rocksdb)
	RocksDBBackend BackendType = "rocksdb"

	// MemDBBackend represents in-memory key value store, which is mostly used
	// for testing.
	MemDBBackend BackendType = "memdb"
)

These are valid backend types.

Jump to

Keyboard shortcuts

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