Versions in this module Expand all Collapse all v0 v0.5.0 Jul 12, 2019 Changes in this version + type Account struct + Balance *big.Int + CodeHash []byte + Nonce uint64 + Root corecrypto.HashType + type Code []byte + func (s Code) String() string + type Mockdb struct + func NewMockdb() *Mockdb + func (mock *Mockdb) AddBalance(address types.AddressHash, amount *big.Int) + func (mock *Mockdb) AddLog(log *types.Log) + func (mock *Mockdb) AddPreimage(hash crypto.HashType, data []byte) + func (mock *Mockdb) AddRefund(refund uint64) + func (mock *Mockdb) CreateAccount(address types.AddressHash) + func (mock *Mockdb) Empty(address types.AddressHash) bool + func (mock *Mockdb) Exist(address types.AddressHash) bool + func (mock *Mockdb) ForEachStorage(types.AddressHash, func(crypto.HashType, crypto.HashType) bool) + func (mock *Mockdb) GetBalance(address types.AddressHash) *big.Int + func (mock *Mockdb) GetCode(address types.AddressHash) []byte + func (mock *Mockdb) GetCodeHash(address types.AddressHash) crypto.HashType + func (mock *Mockdb) GetCodeSize(address types.AddressHash) int + func (mock *Mockdb) GetCommittedState(address types.AddressHash, key crypto.HashType) crypto.HashType + func (mock *Mockdb) GetNonce(address types.AddressHash) uint64 + func (mock *Mockdb) GetRefund() uint64 + func (mock *Mockdb) GetState(address types.AddressHash, key crypto.HashType) crypto.HashType + func (mock *Mockdb) HasSuicided(address types.AddressHash) bool + func (mock *Mockdb) RevertToSnapshot(i int) + func (mock *Mockdb) SetCode(address types.AddressHash, code []byte) + func (mock *Mockdb) SetNonce(address types.AddressHash, nonce uint64) + func (mock *Mockdb) SetState(address types.AddressHash, key, value crypto.HashType) + func (mock *Mockdb) Snapshot() int + func (mock *Mockdb) SubBalance(address types.AddressHash, amount *big.Int) + func (mock *Mockdb) SubRefund(refund uint64) + func (mock *Mockdb) Suicide(address types.AddressHash) bool + type StateDB struct + func New(rootHash, utxoRootHash *corecrypto.HashType, db storage.Table) (*StateDB, error) + func (s *StateDB) AddBalance(addr types.AddressHash, amount *big.Int) + func (s *StateDB) AddLog(log *types.Log) + func (s *StateDB) AddPreimage(hash corecrypto.HashType, preimage []byte) + func (s *StateDB) AddRefund(gas uint64) + func (s *StateDB) Commit(deleteEmptyObjects bool) (*corecrypto.HashType, *corecrypto.HashType, error) + func (s *StateDB) Copy() *StateDB + func (s *StateDB) CreateAccount(addr types.AddressHash) + func (s *StateDB) Database() storage.Table + func (s *StateDB) Empty(addr types.AddressHash) bool + func (s *StateDB) Error() error + func (s *StateDB) Exist(addr types.AddressHash) bool + func (s *StateDB) ForEachStorage(addr types.AddressHash, cb func(key, value corecrypto.HashType) bool) + func (s *StateDB) GetBalance(addr types.AddressHash) *big.Int + func (s *StateDB) GetCode(addr types.AddressHash) []byte + func (s *StateDB) GetCodeHash(addr types.AddressHash) corecrypto.HashType + func (s *StateDB) GetCodeSize(addr types.AddressHash) int + func (s *StateDB) GetCommittedState(addr types.AddressHash, hash corecrypto.HashType) corecrypto.HashType + func (s *StateDB) GetLogs(hash corecrypto.HashType) []*types.Log + func (s *StateDB) GetNonce(addr types.AddressHash) uint64 + func (s *StateDB) GetRefund() uint64 + func (s *StateDB) GetState(a types.AddressHash, b corecrypto.HashType) corecrypto.HashType + func (s *StateDB) GetUtxo(addr types.AddressHash) ([]byte, error) + func (s *StateDB) HasSuicided(addr types.AddressHash) bool + func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) corecrypto.HashType + func (s *StateDB) Logs() []*types.Log + func (s *StateDB) Preimages() map[corecrypto.HashType][]byte + func (s *StateDB) Prepare(thash, bhash corecrypto.HashType, ti int) + func (s *StateDB) Reset() error + func (s *StateDB) RevertToSnapshot(revid int) + func (s *StateDB) SetBalance(addr types.AddressHash, amount *big.Int) + func (s *StateDB) SetCode(addr types.AddressHash, code []byte) + func (s *StateDB) SetNonce(addr types.AddressHash, nonce uint64) + func (s *StateDB) SetState(addr types.AddressHash, key corecrypto.HashType, value corecrypto.HashType) + func (s *StateDB) Snapshot() int + func (s *StateDB) StorageTrie(a types.AddressHash) *trie.Trie + func (s *StateDB) String() string + func (s *StateDB) SubBalance(addr types.AddressHash, amount *big.Int) + func (s *StateDB) SubRefund(gas uint64) + func (s *StateDB) Suicide(addr types.AddressHash) bool + func (s *StateDB) UpdateUtxo(addr types.AddressHash, utxoBytes []byte) error + type Storage map[corecrypto.HashType]corecrypto.HashType + func (s Storage) Copy() Storage + func (s Storage) String() (str string)