Documentation ¶
Overview ¶
Package trie implements Merkle Patricia Tries.
Index ¶
- func BeginsWith(a, b []byte) bool
- func CompactDecode(str []byte) []byte
- func CompactEncode(hexSlice []byte) []byte
- func CompactHexDecode(str []byte) []byte
- func CompareIntSlice(a, b []int) bool
- func DecodeCompact(key []byte) []byte
- func HasTerm(s []byte) bool
- func MatchingNibbleLength(a, b []byte) int
- func RemTerm(s []byte) []byte
- type Backend
- type Cache
- type FullNode
- func (self *FullNode) Branches() []Node
- func (self *FullNode) Copy(t *Trie) Node
- func (self *FullNode) Dirty() bool
- func (self *FullNode) Hash() interface{}
- func (self *FullNode) Len() (amount int)
- func (self *FullNode) RlpData() interface{}
- func (self *FullNode) String() string
- func (self *FullNode) Value() Node
- type HashNode
- type Iterator
- type Node
- type SecureTrie
- func (self *SecureTrie) Copy() *SecureTrie
- func (self *SecureTrie) Delete(key []byte) Node
- func (self *SecureTrie) DeleteString(key string) Node
- func (self *SecureTrie) Get(key []byte) []byte
- func (self *SecureTrie) GetKey(shaKey []byte) []byte
- func (self *SecureTrie) GetString(key string) []byte
- func (self *SecureTrie) Update(key, value []byte) Node
- func (self *SecureTrie) UpdateString(key, value string) Node
- type ShortNode
- type Trie
- func (self *Trie) Commit()
- func (self *Trie) Copy() *Trie
- func (self *Trie) Delete(key []byte) Node
- func (self *Trie) DeleteString(key string) Node
- func (self *Trie) Get(key []byte) []byte
- func (self *Trie) GetString(key string) []byte
- func (self *Trie) Hash() []byte
- func (self *Trie) Iterator() *Iterator
- func (self *Trie) PrintRoot()
- func (self *Trie) Reset()
- func (self *Trie) Root() []byte
- func (self *Trie) Update(key, value []byte) Node
- func (self *Trie) UpdateString(key, value string) Node
- type ValueNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginsWith ¶ added in v0.9.39
func CompactDecode ¶ added in v0.9.39
func CompactEncode ¶ added in v0.9.39
func CompactHexDecode ¶ added in v0.9.39
func CompareIntSlice ¶ added in v0.9.39
Helper function for comparing slices
func DecodeCompact ¶ added in v0.9.39
func MatchingNibbleLength ¶ added in v0.9.39
Returns the amount of nibbles that match each other from 0 ...
Types ¶
type Cache ¶ added in v0.9.39
type Cache struct {
// contains filtered or unexported fields
}
type FullNode ¶ added in v0.9.39
type FullNode struct {
// contains filtered or unexported fields
}
func NewFullNode ¶ added in v0.9.39
type Iterator ¶
func NewIterator ¶
type SecureTrie ¶
type SecureTrie struct {
*Trie
}
func NewSecure ¶
func NewSecure(root []byte, backend Backend) *SecureTrie
func (*SecureTrie) Copy ¶
func (self *SecureTrie) Copy() *SecureTrie
func (*SecureTrie) Delete ¶
func (self *SecureTrie) Delete(key []byte) Node
func (*SecureTrie) DeleteString ¶ added in v0.9.39
func (self *SecureTrie) DeleteString(key string) Node
func (*SecureTrie) Get ¶
func (self *SecureTrie) Get(key []byte) []byte
func (*SecureTrie) GetKey ¶
func (self *SecureTrie) GetKey(shaKey []byte) []byte
func (*SecureTrie) GetString ¶ added in v0.9.39
func (self *SecureTrie) GetString(key string) []byte
func (*SecureTrie) Update ¶
func (self *SecureTrie) Update(key, value []byte) Node
func (*SecureTrie) UpdateString ¶ added in v0.9.39
func (self *SecureTrie) UpdateString(key, value string) Node
type ShortNode ¶ added in v0.9.39
type ShortNode struct {
// contains filtered or unexported fields
}
type Trie ¶
type Trie struct {
// contains filtered or unexported fields
}
func (*Trie) DeleteString ¶ added in v0.9.39
func (*Trie) Reset ¶ added in v0.9.39
func (self *Trie) Reset()
Reset should only be called if the trie has been hashed
func (*Trie) UpdateString ¶ added in v0.9.39
type ValueNode ¶ added in v0.9.39
type ValueNode struct {
// contains filtered or unexported fields
}
func NewValueNode ¶ added in v0.9.39
Click to show internal directories.
Click to hide internal directories.