Versions in this module Expand all Collapse all v0 v0.8.6 Feb 10, 2022 v0.8.5 Feb 10, 2022 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") + var ErrStaleParentLayer = errors.New("parent disk layer is 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 + IsMultiCoin bool + 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, ...) (*Tree, error) + func NewTestTree(diskdb ethdb.KeyValueStore, blockHash, root common.Hash) *Tree + func (t *Tree) AbortGeneration() + func (t *Tree) AccountIterator(root common.Hash, seek common.Hash, force bool) (AccountIterator, error) + func (t *Tree) Discard(blockHash common.Hash) error + func (t *Tree) DiskRoot() common.Hash + func (t *Tree) Flatten(blockHash common.Hash) error + func (t *Tree) NumBlockLayers() int + func (t *Tree) NumStateLayers() int + func (t *Tree) Rebuild(blockHash, root common.Hash) + func (t *Tree) Snapshot(stateRoot common.Hash) Snapshot + func (t *Tree) Snapshots(blockHash common.Hash, limits int, nodisk bool) []Snapshot + func (t *Tree) StorageIterator(root common.Hash, account common.Hash, seek common.Hash, force bool) (StorageIterator, error) + func (t *Tree) Update(blockHash, blockRoot, parentBlockHash common.Hash, ...) error + func (t *Tree) Verify(root common.Hash) error