Versions in this module Expand all Collapse all v1 v1.0.1 Mar 1, 2020 Changes in this version + var MaxTrieCacheGen = uint16(120) + func NewStateSync(root common.Hash, database trie.DatabaseReader) *trie.Sync + type Account struct + Balance *big.Int + CodeHash []byte + Nonce uint64 + Root common.Hash + type Code []byte + func (c Code) String() string + type Database interface + ContractCode func(addrHash, codeHash common.Hash) ([]byte, error) + ContractCodeSize func(addrHash, codeHash common.Hash) (int, error) + CopyTrie func(Trie) Trie + OpenStorageTrie func(addrHash, root common.Hash) (Trie, error) + OpenTrie func(root common.Hash) (Trie, error) + TrieDB func() *trie.Database + func NewDatabase(db ethdb.Database) Database + func NewDatabaseWithCache(db ethdb.Database, cache int) Database + type Dump struct + Accounts map[string]DumpAccount + Root string + type DumpAccount struct + Balance string + Code string + CodeHash string + Nonce uint64 + Root string + Storage map[string]string + type ManagedState struct + func ManageState(statedb *StateDB) *ManagedState + func (ms *ManagedState) GetNonce(addr common.Address) uint64 + func (ms *ManagedState) HasAccount(addr common.Address) bool + func (ms *ManagedState) NewNonce(addr common.Address) uint64 + func (ms *ManagedState) RemoveNonce(addr common.Address, n uint64) + func (ms *ManagedState) SetNonce(addr common.Address, nonce uint64) + func (ms *ManagedState) SetState(statedb *StateDB) + type NodeIterator struct + Error error + Hash common.Hash + Parent common.Hash + func NewNodeIterator(state *StateDB) *NodeIterator + func (it *NodeIterator) Next() bool + type StateDB struct + func New(root common.Hash, db Database) (*StateDB, error) + func (s *StateDB) AddBalance(addr common.Address, amount *big.Int) + func (s *StateDB) AddLog(log *types.Log) + func (s *StateDB) AddPreimage(hash common.Hash, preimage []byte) + func (s *StateDB) AddRefund(gas uint64) + func (s *StateDB) Commit(deleteEmptyObjects bool) (root common.Hash, err error) + func (s *StateDB) Copy() *StateDB + func (s *StateDB) CreateAccount(addr common.Address) + func (s *StateDB) Database() Database + func (s *StateDB) Dump() []byte + func (s *StateDB) Empty(addr common.Address) bool + func (s *StateDB) Error() error + func (s *StateDB) Exist(addr common.Address) bool + func (s *StateDB) Finalise(deleteEmptyObjects bool) + func (s *StateDB) ForEachStorage(addr common.Address, cb func(key, value common.Hash) bool) error + func (s *StateDB) GetBalance(addr common.Address) *big.Int + func (s *StateDB) GetCode(addr common.Address) []byte + func (s *StateDB) GetCodeHash(addr common.Address) common.Hash + func (s *StateDB) GetCodeSize(addr common.Address) int + func (s *StateDB) GetCommittedState(addr common.Address, hash common.Hash) common.Hash + func (s *StateDB) GetLogs(hash common.Hash) []*types.Log + func (s *StateDB) GetNonce(addr common.Address) uint64 + func (s *StateDB) GetOrNewStateObject(addr common.Address) *stateObject + func (s *StateDB) GetProof(a common.Address) ([][]byte, error) + func (s *StateDB) GetRefund() uint64 + func (s *StateDB) GetState(addr common.Address, hash common.Hash) common.Hash + func (s *StateDB) GetStorageProof(a common.Address, key common.Hash) ([][]byte, error) + func (s *StateDB) HasSuicided(addr common.Address) bool + func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash + func (s *StateDB) Logs() []*types.Log + func (s *StateDB) Preimages() map[common.Hash][]byte + func (s *StateDB) Prepare(thash, bhash common.Hash, ti int) + func (s *StateDB) RawDump() Dump + func (s *StateDB) Reset(root common.Hash) error + func (s *StateDB) RevertToSnapshot(revid int) + func (s *StateDB) SetBalance(addr common.Address, amount *big.Int) + func (s *StateDB) SetCode(addr common.Address, code []byte) + func (s *StateDB) SetNonce(addr common.Address, nonce uint64) + func (s *StateDB) SetState(addr common.Address, key, value common.Hash) + func (s *StateDB) Snapshot() int + func (s *StateDB) StorageTrie(addr common.Address) Trie + func (s *StateDB) SubBalance(addr common.Address, amount *big.Int) + func (s *StateDB) SubRefund(gas uint64) + func (s *StateDB) Suicide(addr common.Address) bool + type Storage map[common.Hash]common.Hash + func (self Storage) Copy() Storage + func (self Storage) String() (str string) + type Trie interface + Commit func(onleaf trie.LeafCallback) (common.Hash, error) + GetKey func([]byte) []byte + Hash func() common.Hash + NodeIterator func(startKey []byte) trie.NodeIterator + Prove func(key []byte, fromLevel uint, proofDb ethdb.Putter) error + TryDelete func(key []byte) error + TryGet func(key []byte) ([]byte, error) + TryUpdate func(key, value []byte) error