Versions in this module Expand all Collapse all v1 v1.9.2 Aug 23, 2019 Changes in this version type StateDB + func (self *StateDB) SetStorage(addr common.Address, storage map[common.Hash]common.Hash) v1.9.0 Jul 31, 2019 Changes in this version + var MaxTrieCacheGen = uint16(120) + func CalculateSmiloPay(prevBlock, newBlock, prevSmiloPay, balance *big.Int) *big.Int + func MaxSmiloPay(balance *big.Int) (maxSmiloPayReturn *big.Int, balanceSmilo *big.Float) + func NewStateSync(root common.Hash, database ethdb.KeyValueReader, bloom *trie.SyncBloom) *trie.Sync + type Account struct + Balance *big.Int + BlockNumber *big.Int + CodeHash []byte + Nonce uint64 + Root common.Hash + SmiloPay *big.Int + 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[common.Address]DumpAccount + Root string + type DumpAccount struct + Address *common.Address + Balance string + Code string + CodeHash string + Nonce uint64 + Root string + SecureKey hexutil.Bytes + Storage map[common.Hash]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 + AccountCommits time.Duration + AccountHashes time.Duration + AccountReads time.Duration + AccountUpdates time.Duration + StorageCommits time.Duration + StorageHashes time.Duration + StorageReads time.Duration + StorageUpdates time.Duration + func New(root common.Hash, db Database) (*StateDB, error) + func (db *StateDB) ForEachStorage(addr common.Address, cb func(key, value common.Hash) bool) error + func (s *StateDB) Commit(deleteEmptyObjects bool) (root common.Hash, err error) + func (s *StateDB) Finalise(deleteEmptyObjects bool) + func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash + func (self *StateDB) AddBalance(addr common.Address, amount *big.Int, blockNumber *big.Int) + func (self *StateDB) AddLog(log *types.Log) + func (self *StateDB) AddPreimage(hash common.Hash, preimage []byte) + func (self *StateDB) AddRefund(gas uint64) + func (self *StateDB) AddSmiloPay(addr common.Address, amount *big.Int) + func (self *StateDB) BlockHash() common.Hash + func (self *StateDB) Copy() *StateDB + func (self *StateDB) CreateAccount(addr common.Address) + func (self *StateDB) Database() Database + func (self *StateDB) Dump(excludeCode, excludeStorage, excludeMissingPreimages bool) []byte + func (self *StateDB) Empty(addr common.Address) bool + func (self *StateDB) Error() error + func (self *StateDB) Exist(addr common.Address) bool + func (self *StateDB) GetBalance(addr common.Address) *big.Int + func (self *StateDB) GetCode(addr common.Address) []byte + func (self *StateDB) GetCodeHash(addr common.Address) common.Hash + func (self *StateDB) GetCodeSize(addr common.Address) int + func (self *StateDB) GetCommittedState(addr common.Address, hash common.Hash) common.Hash + func (self *StateDB) GetLogs(hash common.Hash) []*types.Log + func (self *StateDB) GetNonce(addr common.Address) uint64 + func (self *StateDB) GetOrNewStateObject(addr common.Address) *stateObject + func (self *StateDB) GetProof(a common.Address) ([][]byte, error) + func (self *StateDB) GetRefund() uint64 + func (self *StateDB) GetSmiloPay(addr common.Address, blockNumber *big.Int) *big.Int + func (self *StateDB) GetState(addr common.Address, hash common.Hash) common.Hash + func (self *StateDB) GetStorageProof(a common.Address, key common.Hash) ([][]byte, error) + func (self *StateDB) GetStorageRoot(addr common.Address) (common.Hash, error) + func (self *StateDB) HasSuicided(addr common.Address) bool + func (self *StateDB) IterativeDump(excludeCode, excludeStorage, excludeMissingPreimages bool, ...) + func (self *StateDB) Logs() []*types.Log + func (self *StateDB) Preimages() map[common.Hash][]byte + func (self *StateDB) Prepare(thash, bhash common.Hash, ti int) + func (self *StateDB) RawDump(excludeCode, excludeStorage, excludeMissingPreimages bool) Dump + func (self *StateDB) Reset(root common.Hash) error + func (self *StateDB) RevertToSnapshot(revid int) + func (self *StateDB) SetBalance(addr common.Address, amount, blockNumber *big.Int) + func (self *StateDB) SetCode(addr common.Address, code []byte) + func (self *StateDB) SetNonce(addr common.Address, nonce uint64) + func (self *StateDB) SetSmiloPay(addr common.Address, amount *big.Int) + func (self *StateDB) SetState(addr common.Address, key, value common.Hash) + func (self *StateDB) Snapshot() int + func (self *StateDB) StorageTrie(addr common.Address) Trie + func (self *StateDB) SubBalance(addr common.Address, amount, blockNumber *big.Int) + func (self *StateDB) SubRefund(gas uint64) + func (self *StateDB) SubSmiloPay(addr common.Address, amount, blockNumber *big.Int) + func (self *StateDB) Suicide(addr common.Address) bool + func (self *StateDB) TxIndex() int + func (self *StateDB) UpdateSmiloPay(addr common.Address, blockNumber *big.Int) + type Storage map[common.Hash]common.Hash + func (s Storage) Copy() Storage + func (s 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.KeyValueWriter) error + TryDelete func(key []byte) error + TryGet func(key []byte) ([]byte, error) + TryUpdate func(key, value []byte) error