package
0.0.0-20210301081109-a173fca9e8fd
Repository: https://github.com/drep-project/drep-chain.git
Documentation: pkg.go.dev
# Functions
New creates a trie with an existing root node from db.
NewDatabase creates a new trie database to store ephemeral trie content before its written out to disk or garbage collected.
NewDatabaseWithCache creates a new trie database to store ephemeral trie content before its written out to disk or garbage collected.
NewDifferenceIterator constructs a NodeIterator that iterates over elements in b that are not in a.
NewIterator creates a new key-value iterator from a node iterator.
NewSecure creates a trie with an existing root node from a backing database and optional intermediate in-memory node pool.
读数据从oldDB中,数据写入,写到newDB中.
NewUnionIterator constructs a NodeIterator that iterates over elements in the union of the provided NodeIterators.
数据恢复从oldDB中读取数据,数据存储使用writeDB.
# Variables
emptyRoot is the known root hash of an empty trie.
No description provided by the author
# Structs
Database is an intermediate write layer between the trie data structures and the disk database.
Iterator is a key-value trie iterator that traverses a Trie.
MissingNodeError is returned by the trie functions (TryGet, TryUpdate, TryDelete) in the case where a trie node is not present in the local database.
SecureTrie wraps a trie with key hashing.
Trie is a Merkle Patricia Trie.
# Interfaces
NodeIterator is an iterator to traverse the trie pre-order.
# Type aliases
LeafCallback is a callback type invoked when a trie operation reaches a leaf node.