Documentation ¶
Index ¶
- Constants
- func DeleteNodes(db *leveldb.DB, hashList []types.Hash) error
- type Iterator
- type NodeIterator
- type Trie
- func (trie *Trie) Copy() *Trie
- func (trie *Trie) GetValue(key []byte) []byte
- func (trie *Trie) Hash() *types.Hash
- func (trie *Trie) LeafNodeValue(leafNode *TrieNode) []byte
- func (trie *Trie) NewIterator(prefix []byte) *Iterator
- func (trie *Trie) NewNodeIterator() *NodeIterator
- func (trie *Trie) Save(batch *leveldb.Batch) (successCallback func(), returnErr error)
- func (trie *Trie) SetValue(key []byte, value []byte)
- type TrieNode
- func (trieNode *TrieNode) AtomicComplete(completeFunc func())
- func (trieNode *TrieNode) Children() map[byte]*TrieNode
- func (trieNode *TrieNode) Copy(copyHash bool) *TrieNode
- func (trieNode *TrieNode) DbDeserialize(buf []byte) error
- func (trieNode *TrieNode) DbSerialize() ([]byte, error)
- func (trieNode *TrieNode) Hash() *types.Hash
- func (trieNode *TrieNode) IsLeafNode() bool
- func (trieNode *TrieNode) NodeType() byte
- func (trieNode *TrieNode) SetChild(child *TrieNode)
- func (trieNode *TrieNode) Value() []byte
- type TrieNodePool
Constants ¶
View Source
const ( TRIE_UNKNOW_NODE = byte(iota) TRIE_FULL_NODE TRIE_SHORT_NODE TRIE_VALUE_NODE TRIE_HASH_NODE )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func NewIterator ¶
type NodeIterator ¶
type NodeIterator struct {
// contains filtered or unexported fields
}
func NewNodeIterator ¶
func NewNodeIterator(trie *Trie) *NodeIterator
func (*NodeIterator) Node ¶
func (ni *NodeIterator) Node() *TrieNode
type Trie ¶
type Trie struct { Root *TrieNode // contains filtered or unexported fields }
func (*Trie) LeafNodeValue ¶
func (*Trie) NewIterator ¶
func (*Trie) NewNodeIterator ¶
func (trie *Trie) NewNodeIterator() *NodeIterator
type TrieNode ¶
type TrieNode struct {
// contains filtered or unexported fields
}
func NewFullNode ¶
func NewHashNode ¶
func NewShortNode ¶
func NewValueNode ¶
func (*TrieNode) AtomicComplete ¶
func (trieNode *TrieNode) AtomicComplete(completeFunc func())
func (*TrieNode) DbDeserialize ¶
func (*TrieNode) DbSerialize ¶
func (*TrieNode) IsLeafNode ¶
type TrieNodePool ¶
type TrieNodePool struct {
// contains filtered or unexported fields
}
func NewCustomTrieNodePool ¶
func NewCustomTrieNodePool(limit int, clearNum int) *TrieNodePool
func NewTrieNodePool ¶
func NewTrieNodePool() *TrieNodePool
func (*TrieNodePool) Clear ¶
func (pool *TrieNodePool) Clear()
Click to show internal directories.
Click to hide internal directories.