Versions in this module Expand all Collapse all v1 v1.14.14 Nov 19, 2024 v1.14.13 Nov 19, 2024 Changes in this version + var ErrNotConstructed = errors.New("snapshot is not constructed") + var ErrNotCoveredYet = errors.New("not covered yet") + var ErrSnapshotStale = errors.New("snapshot stale") + func CheckDanglingStorage(chaindb ethdb.KeyValueStore) error + func CheckJournalAccount(db ethdb.KeyValueStore, hash common.Hash) error + func GenerateAccountTrieRoot(it AccountIterator) (common.Hash, error) + func GenerateStorageTrieRoot(account common.Hash, it StorageIterator) (common.Hash, error) + func GenerateTrie(snaptree *Tree, root common.Hash, src ethdb.Database, dst ethdb.KeyValueWriter) error + func ParseGeneratorStatus(generatorBlob []byte) string + type AccountIterator interface + Account func() []byte + type Config struct + AsyncBuild bool + CacheSize int + NoBuild bool + Recovery bool + type Iterator interface + Error func() error + Hash func() common.Hash + Next func() bool + Release func() + type Snapshot interface + Account func(hash common.Hash) (*types.SlimAccount, error) + AccountRLP func(hash common.Hash) ([]byte, error) + Root func() common.Hash + Storage func(accountHash, storageHash common.Hash) ([]byte, error) + type StorageIterator interface + Slot func() []byte + type Tree struct + func New(config Config, diskdb ethdb.KeyValueStore, triedb *triedb.Database, ...) (*Tree, error) + func (t *Tree) AccountIterator(root common.Hash, seek common.Hash) (AccountIterator, error) + func (t *Tree) Cap(root common.Hash, layers int) error + func (t *Tree) Disable() + func (t *Tree) DiskRoot() common.Hash + func (t *Tree) Journal(root common.Hash) (common.Hash, error) + func (t *Tree) Rebuild(root common.Hash) + func (t *Tree) Release() + func (t *Tree) Size() (diffs common.StorageSize, buf common.StorageSize) + func (t *Tree) Snapshot(blockRoot common.Hash) Snapshot + func (t *Tree) Snapshots(root common.Hash, limits int, nodisk bool) []Snapshot + func (t *Tree) StorageIterator(root common.Hash, account common.Hash, seek common.Hash) (StorageIterator, error) + func (t *Tree) Update(blockRoot common.Hash, parentRoot common.Hash, ...) error + func (t *Tree) Verify(root common.Hash) error