Versions in this module Expand all Collapse all v1 v1.10.3 Jun 30, 2021 v1.10.2 Jun 30, 2021 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 FullAccountRLP(data []byte) ([]byte, 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 SlimAccountRLP(nonce uint64, balance *big.Int, root common.Hash, codehash []byte) []byte + type Account struct + Balance *big.Int + CodeHash []byte + Nonce uint64 + Root []byte + func FullAccount(data []byte) (Account, error) + func SlimAccount(nonce uint64, balance *big.Int, root common.Hash, codehash []byte) Account + type AccountIterator interface + Account func() []byte + type Iterator interface + Error func() error + Hash func() common.Hash + Next func() bool + Release func() + type Snapshot interface + Account func(hash common.Hash) (*Account, 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(diskdb ethdb.KeyValueStore, triedb *trie.Database, cache int, root common.Hash, ...) (*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) DiskRoot() common.Hash + func (t *Tree) Journal(root common.Hash) (common.Hash, error) + func (t *Tree) LegacyJournal(root common.Hash) (common.Hash, error) + func (t *Tree) Rebuild(root common.Hash) + 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