Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoData = errors.New("no data in hash node")
ErrNoData is an error when a hash node has no corresponding data
Functions ¶
func DefaultHashFunc ¶
DefaultHashFunc implements a default hash function
func NewLeafIterator ¶
NewLeafIterator returns a new leaf iterator
func NewTwoLayerTrie ¶
func NewTwoLayerTrie(dbForTrie trie.KVStore, rootKey string) trie.TwoLayerTrie
NewTwoLayerTrie creates a two layer trie
Types ¶
type LeafIterator ¶
type LeafIterator struct {
// contains filtered or unexported fields
}
LeafIterator defines an iterator to go through all the leaves under given node
type Option ¶
type Option func(*merklePatriciaTrie) error
Option sets parameters for SameKeyLenTrieContext construction parameter
func HashFuncOption ¶
HashFuncOption sets the hash func for the trie
func KVStoreOption ¶
KVStoreOption sets the kvStore for the trie
func KeyLengthOption ¶
KeyLengthOption sets the length of the keys saved in trie
func RootHashOption ¶
RootHashOption sets the root hash for the trie
Click to show internal directories.
Click to hide internal directories.