Documentation ¶
Index ¶
- func BeginsWith(a, b []byte) bool
- func CompactDecode(str string) []byte
- func CompactEncode(hexSlice []byte) string
- func CompactHexDecode(str string) []byte
- func CompareIntSlice(a, b []int) bool
- func DecodeCompact(key []byte) string
- func EmptyStringSlice(l int) []interface{}
- func HasTerm(s []byte) bool
- func MatchingNibbleLength(a, b []byte) int
- func RemTerm(s []byte) []byte
- type Cache
- type EachCallback
- type Iterator
- type Node
- type NodeType
- type StateObject
- type Trie
- func (t *Trie) Cache() *Cache
- func (t *Trie) Cmp(trie *Trie) bool
- func (t *Trie) Copy() *Trie
- func (t *Trie) Delete(key string)
- func (t *Trie) Get(key string) string
- func (self *Trie) GetRoot() []byte
- func (t *Trie) InsertState(node interface{}, key []byte, value interface{}) interface{}
- func (self *Trie) Iterator() *Iterator
- func (t *Trie) NewIterator() *TrieIterator
- func (t *Trie) Put(node interface{}) interface{}
- func (t *Trie) Sync()
- func (t *Trie) Undo()
- func (t *Trie) Update(key, value string)
- func (t *Trie) UpdateState(node interface{}, key []byte, value string) interface{}
- type TrieIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginsWith ¶
func CompactDecode ¶
func CompactEncode ¶
func CompactHexDecode ¶
func DecodeCompact ¶
func EmptyStringSlice ¶
func EmptyStringSlice(l int) []interface{}
func MatchingNibbleLength ¶
Returns the amount of nibbles that match each other from 0 ...
Types ¶
type EachCallback ¶
type Iterator ¶
type Iterator struct { Path [][]byte Key []byte Value *ethutil.Value // contains filtered or unexported fields }
func NewIterator ¶
type StateObject ¶
type StateObject interface { State() *Trie Sync() Undo() }
TODO A StateObject is an object that has a state root This is goig to be the object for the second level caching (the caching of object which have a state such as contracts)
type Trie ¶
type Trie struct { Root interface{} // contains filtered or unexported fields }
A (modified) Radix Trie implementation. The Trie implements a caching mechanism and will used cached values if they are present. If a node is not present in the cache it will try to fetch it from the database and store the cached value. Please note that the data isn't persisted unless `Sync` is explicitly called.
func ParanoiaCheck ¶
func (*Trie) InsertState ¶
func (*Trie) NewIterator ¶
func (t *Trie) NewIterator() *TrieIterator
func (*Trie) UpdateState ¶
type TrieIterator ¶
type TrieIterator struct {
// contains filtered or unexported fields
}
func (*TrieIterator) Collect ¶
func (it *TrieIterator) Collect() [][]byte
func (*TrieIterator) Each ¶
func (it *TrieIterator) Each(cb EachCallback)
func (*TrieIterator) Key ¶
func (it *TrieIterator) Key() string
func (*TrieIterator) Purge ¶
func (it *TrieIterator) Purge() int
func (*TrieIterator) Value ¶
func (it *TrieIterator) Value() string
Click to show internal directories.
Click to hide internal directories.