Versions in this module Expand all Collapse all v1 v1.0.2 Dec 20, 2016 Changes in this version + var ErrNotRequested = errors.New("not requested") + func CacheMisses() int64 + func CacheUnloads() int64 + func VerifyProof(rootHash common.Hash, key []byte, proof []rlp.RawValue) (value []byte, err error) + type Database interface + Get func(key []byte) (value []byte, err error) + type DatabaseWriter interface + Put func(key, value []byte) error + type Iterator struct + Key []byte + Value []byte + func NewIterator(trie *Trie) *Iterator + func (it *Iterator) Next() bool + type MissingNodeError struct + Key []byte + NodeHash common.Hash + PrefixLen int + RootHash common.Hash + SuffixLen int + func (err *MissingNodeError) Error() string + type NodeIterator struct + Error error + Hash common.Hash + Leaf bool + LeafBlob []byte + Node node + Parent common.Hash + func NewNodeIterator(trie *Trie) *NodeIterator + func (it *NodeIterator) Next() bool + type SecureTrie struct + func NewSecure(root common.Hash, db Database, cachelimit uint16) (*SecureTrie, error) + func (t *SecureTrie) Commit() (root common.Hash, err error) + func (t *SecureTrie) CommitTo(db DatabaseWriter) (root common.Hash, err error) + func (t *SecureTrie) Delete(key []byte) + func (t *SecureTrie) Get(key []byte) []byte + func (t *SecureTrie) GetKey(shaKey []byte) []byte + func (t *SecureTrie) Hash() common.Hash + func (t *SecureTrie) Iterator() *Iterator + func (t *SecureTrie) NodeIterator() *NodeIterator + func (t *SecureTrie) Root() []byte + func (t *SecureTrie) TryDelete(key []byte) error + func (t *SecureTrie) TryGet(key []byte) ([]byte, error) + func (t *SecureTrie) TryUpdate(key, value []byte) error + func (t *SecureTrie) Update(key, value []byte) + type SyncResult struct + Data []byte + Hash common.Hash + type Trie struct + func New(root common.Hash, db Database) (*Trie, error) + func (t *Trie) Commit() (root common.Hash, err error) + func (t *Trie) CommitTo(db DatabaseWriter) (root common.Hash, err error) + func (t *Trie) Delete(key []byte) + func (t *Trie) Get(key []byte) []byte + func (t *Trie) Hash() common.Hash + func (t *Trie) Iterator() *Iterator + func (t *Trie) Prove(key []byte) []rlp.RawValue + func (t *Trie) Root() []byte + func (t *Trie) SetCacheLimit(l uint16) + func (t *Trie) TryDelete(key []byte) error + func (t *Trie) TryGet(key []byte) ([]byte, error) + func (t *Trie) TryUpdate(key, value []byte) error + func (t *Trie) Update(key, value []byte) + type TrieSync struct + func NewTrieSync(root common.Hash, database ethdb.Database, callback TrieSyncLeafCallback) *TrieSync + func (s *TrieSync) AddRawEntry(hash common.Hash, depth int, parent common.Hash) + func (s *TrieSync) AddSubTrie(root common.Hash, depth int, parent common.Hash, callback TrieSyncLeafCallback) + func (s *TrieSync) Missing(max int) []common.Hash + func (s *TrieSync) Pending() int + func (s *TrieSync) Process(results []SyncResult) (int, error) + type TrieSyncLeafCallback func(leaf []byte, parent common.Hash) error