Documentation ¶
Index ¶
- Constants
- type Iterator
- type NodePool
- type Trie
- func (trie *Trie) Clone() *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(fn func(*TrieNode) bool) <-chan *TrieNode
- func (trie *Trie) Remove(batch ...storage.Batch) (err error)
- func (trie *Trie) Save(batch ...storage.Batch) (fn func(), err error)
- func (trie *Trie) SaveInTxn(batch storage.Batch) (func(), error)
- func (trie *Trie) SetValue(key []byte, value []byte)
- type TrieNode
- func (t *TrieNode) Children() map[byte]*TrieNode
- func (t *TrieNode) Clone(copyHash bool) *TrieNode
- func (t *TrieNode) Deserialize(buf []byte) error
- func (t *TrieNode) Hash() *types.Hash
- func (t *TrieNode) IsLeafNode() bool
- func (t *TrieNode) LeafCallback(completeFunc func())
- func (t *TrieNode) NodeType() byte
- func (t *TrieNode) Serialize() ([]byte, error)
- func (t *TrieNode) SetChild(child *TrieNode)
- func (t *TrieNode) SortedChildren() []*TrieNode
- func (t *TrieNode) String() string
- func (t *TrieNode) Value() []byte
Constants ¶
View Source
const ( UnknownNode = byte(iota) FullNode ShortNode ValueNode HashNode )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func NewIterator ¶
type NodePool ¶
type NodePool struct {
// contains filtered or unexported fields
}
func GetGlobalTriePool ¶ added in v1.4.0
func GetGlobalTriePool() *NodePool
func NewSimpleTrieNodePool ¶
func NewSimpleTrieNodePool() *NodePool
func NewTrieNodePool ¶
type Trie ¶
type Trie struct { Root *TrieNode // contains filtered or unexported fields }
func (*Trie) LeafNodeValue ¶
func (*Trie) NewIterator ¶
func (*Trie) NewNodeIterator ¶
type TrieNode ¶
type TrieNode struct {
// contains filtered or unexported fields
}
func NewFullNode ¶
func NewHashNode ¶
func NewShortNode ¶
func NewValueNode ¶
func (*TrieNode) Deserialize ¶
func (*TrieNode) IsLeafNode ¶
func (*TrieNode) LeafCallback ¶
func (t *TrieNode) LeafCallback(completeFunc func())
func (*TrieNode) SortedChildren ¶ added in v1.2.3
Click to show internal directories.
Click to hide internal directories.