Documentation ¶
Index ¶
- func NewDatabase(db massdb.KeyValueStore) massdb.Database
- func NewLevelDBDatabase(file string, cache int, handles int, namespace string, readonly bool) (massdb.Database, error)
- func NewMemoryDatabase() massdb.Database
- func NewMemoryDatabaseWithCap(size int) massdb.Database
- func ReadTrieNode(db massdb.KeyValueReader, hash common.Hash) []byte
- func WriteTrieNode(db massdb.KeyValueWriter, hash common.Hash, node []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDatabase ¶
func NewDatabase(db massdb.KeyValueStore) massdb.Database
NewDatabase creates a high level database on top of a given key-value data store without a freezer moving immutable chain segments into cold storage.
func NewLevelDBDatabase ¶
func NewLevelDBDatabase(file string, cache int, handles int, namespace string, readonly bool) (massdb.Database, error)
NewLevelDBDatabase creates a persistent key-value database without a freezer moving immutable chain segments into cold storage.
func NewMemoryDatabase ¶
NewMemoryDatabase creates an ephemeral in-memory key-value database without a freezer moving immutable chain segments into cold storage.
func NewMemoryDatabaseWithCap ¶
NewMemoryDatabaseWithCap creates an ephemeral in-memory key-value database with an initial starting capacity, but without a freezer moving immutable chain segments into cold storage.
func ReadTrieNode ¶
func ReadTrieNode(db massdb.KeyValueReader, hash common.Hash) []byte
ReadTrieNode retrieves the trie node of the provided hash.
func WriteTrieNode ¶
func WriteTrieNode(db massdb.KeyValueWriter, hash common.Hash, node []byte)
WriteTrieNode writes the provided trie node database.
Types ¶
This section is empty.