Versions in this module Expand all Collapse all v3 v3.3.5 May 9, 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 common.Hash + Nonce uint64 + Root common.Hash + func (a *Account) EncodeRLP(w io.Writer) error + func (a *Account) MarshalRLP() (_ []byte, err error) + func (a *Account) RLPSize() int + type Code []byte + func (self 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 common.Database) Database + func NewDatabaseWithCache(db common.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 (db *StateDB) AddBalance(addr common.Address, amount *big.Int) + func (db *StateDB) AddLog(log *types.Log) + func (db *StateDB) AddPreimage(hash common.Hash, preimage []byte) + func (db *StateDB) AddRefund(gas uint64) + func (db *StateDB) BlockHash() common.Hash + func (db *StateDB) Commit(deleteEmptyObjects bool) (root common.Hash, err error) + func (db *StateDB) Copy() *StateDB + func (db *StateDB) CreateAccount(addr common.Address) + func (db *StateDB) Database() Database + func (db *StateDB) Dump() []byte + func (db *StateDB) Empty(addr common.Address) bool + func (db *StateDB) Exist(addr common.Address) bool + func (db *StateDB) Finalise(deleteEmptyObjects bool) + func (db *StateDB) ForEachStorage(addr common.Address, cb func(key, value common.Hash) bool) + func (db *StateDB) GetBalance(addr common.Address) *big.Int + func (db *StateDB) GetBalanceErr(addr common.Address) (*big.Int, error) + func (db *StateDB) GetCode(addr common.Address) []byte + func (db *StateDB) GetCodeErr(addr common.Address) ([]byte, error) + func (db *StateDB) GetCodeHash(addr common.Address) common.Hash + func (db *StateDB) GetCodeSize(addr common.Address) int + func (db *StateDB) GetCommittedState(addr common.Address, hash common.Hash) common.Hash + func (db *StateDB) GetLogs(hash common.Hash) []*types.Log + func (db *StateDB) GetNonce(addr common.Address) uint64 + func (db *StateDB) GetNonceErr(addr common.Address) (uint64, error) + func (db *StateDB) GetOrNewStateObject(addr common.Address) *stateObject + func (db *StateDB) GetRefund() uint64 + func (db *StateDB) GetState(a common.Address, b common.Hash) common.Hash + func (db *StateDB) GetStateErr(addr common.Address, hash common.Hash) (common.Hash, error) + func (db *StateDB) HasSuicided(addr common.Address) bool + func (db *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash + func (db *StateDB) Logs() []*types.Log + func (db *StateDB) Preimages() map[common.Hash][]byte + func (db *StateDB) Prepare(thash, bhash common.Hash, ti int) + func (db *StateDB) RawDump() Dump + func (db *StateDB) Reset(root common.Hash) error + func (db *StateDB) RevertToSnapshot(revid int) + func (db *StateDB) SetBalance(addr common.Address, amount *big.Int) + func (db *StateDB) SetCode(addr common.Address, code []byte) + func (db *StateDB) SetNonce(addr common.Address, nonce uint64) + func (db *StateDB) SetState(addr common.Address, key common.Hash, value common.Hash) + func (db *StateDB) Snapshot() int + func (db *StateDB) StorageTrie(a common.Address) Trie + func (db *StateDB) SubBalance(addr common.Address, amount *big.Int) + func (db *StateDB) SubRefund(gas uint64) + func (db *StateDB) Suicide(addr common.Address) bool + func (db *StateDB) TxIndex() int + func (self *StateDB) GetProof(a common.Address) ([][]byte, error) + func (self *StateDB) GetStorageProof(a common.Address, key common.Hash) ([][]byte, error) + 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 common.Putter) error + TryDelete func(key []byte) error + TryGet func(key []byte) ([]byte, error) + TryUpdate func(key, value []byte) error Other modules containing this package github.com/beyonderyue/gochain