Documentation ¶
Overview ¶
Package statedb
@author: xwc1125
Package statedb ¶
@author: xwc1125
Package statedb ¶
@author: xwc1125
Package statedb ¶
@author: xwc1125
Package statedb ¶
@author: xwc1125
Package statedb ¶
@author: xwc1125
Index ¶
- func NewXStore(root types.Hash, db basedb.Database) (*xStore, error)
- func WithConfig(config *Config) option
- type Config
- type EVMStateDB
- func (es *EVMStateDB) AddBalance(address types.Address, amount *big.Int)
- func (es *EVMStateDB) CreateAccount(address types.Address)
- func (es *EVMStateDB) Empty(address types.Address) bool
- func (es *EVMStateDB) Exist(address types.Address) bool
- func (es *EVMStateDB) ForEachStorage(address types.Address, cb func(types.Hash, types.Hash) bool) error
- func (es *EVMStateDB) GetBalance(address types.Address) *big.Int
- func (es *EVMStateDB) GetCode(address types.Address) []byte
- func (es *EVMStateDB) GetCodeHash(address types.Address) types.Hash
- func (es *EVMStateDB) GetCodeSize(address types.Address) int
- func (es *EVMStateDB) GetCommittedState(address types.Address, hash types.Hash) types.Hash
- func (es *EVMStateDB) GetNonce(address types.Address) uint64
- func (es *EVMStateDB) GetState(address types.Address, hash types.Hash) types.Hash
- func (es *EVMStateDB) HasSuicided(address types.Address) bool
- func (es *EVMStateDB) SetCode(address types.Address, code []byte)
- func (es *EVMStateDB) SetNonce(address types.Address, nonce uint64)
- func (es *EVMStateDB) SetState(address types.Address, key, value types.Hash)
- func (es *EVMStateDB) SubBalance(address types.Address, amount *big.Int)
- func (es *EVMStateDB) Suicide(address types.Address) bool
- type StateDB
- func (s *StateDB) AddDomain(domain string, store accounts.DomainStore)
- func (s *StateDB) AddLog(log *statetype.Log)
- func (s *StateDB) AddPreimage(hash types.Hash, preimage []byte)
- func (s *StateDB) AddRefund(gas uint64)
- func (s *StateDB) Commit(deleteEmptyObjects bool) (types.Hash, error)
- func (s *StateDB) CreateAccount(account *accounts.AccountStore)
- func (s *StateDB) Error() error
- func (s *StateDB) Finalise(deleteEmptyObjects bool)
- func (s *StateDB) GetDomain(domain string) *accounts.DomainStore
- func (s *StateDB) GetLogs(hash types.Hash) []*statetype.Log
- func (s *StateDB) GetRefund() uint64
- func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) types.Hash
- func (s *StateDB) KVExist(account string, namespace string, key string) bool
- func (s *StateDB) Logs() []*statetype.Log
- func (s *StateDB) Prepare(thash, bhash types.Hash, ti int)
- func (s *StateDB) RevertToSnapshot(revid int)
- func (s *StateDB) SetAddress(account string, address types.Address)
- func (s *StateDB) SetConfig(config *Config)
- func (s *StateDB) Snapshot() int
- func (s *StateDB) SubRefund(gas uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithConfig ¶
func WithConfig(config *Config) option
Types ¶
type Config ¶
type EVMStateDB ¶
type EVMStateDB struct {
*StateDB
}
func NewEvmStateDB ¶
func NewEvmStateDB(db *StateDB) *EVMStateDB
func (*EVMStateDB) AddBalance ¶
func (es *EVMStateDB) AddBalance(address types.Address, amount *big.Int)
func (*EVMStateDB) CreateAccount ¶
func (es *EVMStateDB) CreateAccount(address types.Address)
func (*EVMStateDB) ForEachStorage ¶
func (*EVMStateDB) GetBalance ¶
func (es *EVMStateDB) GetBalance(address types.Address) *big.Int
func (*EVMStateDB) GetCodeHash ¶
func (es *EVMStateDB) GetCodeHash(address types.Address) types.Hash
func (*EVMStateDB) GetCodeSize ¶
func (es *EVMStateDB) GetCodeSize(address types.Address) int
func (*EVMStateDB) GetCommittedState ¶
func (*EVMStateDB) HasSuicided ¶
func (es *EVMStateDB) HasSuicided(address types.Address) bool
func (*EVMStateDB) SetState ¶
func (es *EVMStateDB) SetState(address types.Address, key, value types.Hash)
func (*EVMStateDB) SubBalance ¶
func (es *EVMStateDB) SubBalance(address types.Address, amount *big.Int)
type StateDB ¶
type StateDB struct { *accountdb.AccountDB *accountdb.AccountMap *accountdb.AccountKVS // contains filtered or unexported fields }
func (*StateDB) CreateAccount ¶
func (s *StateDB) CreateAccount(account *accounts.AccountStore)
func (*StateDB) IntermediateRoot ¶
func (*StateDB) RevertToSnapshot ¶
RevertToSnapshot reverts all state changes made since the given revision.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package accountdb @author: xwc1125 Package accountdb @author: xwc1125 Package accountdb @author: xwc1125 Package accountdb @author: xwc1125 Package accountdb @author: xwc1125
|
Package accountdb @author: xwc1125 Package accountdb @author: xwc1125 Package accountdb @author: xwc1125 Package accountdb @author: xwc1125 Package accountdb @author: xwc1125 |
Package vmdb @author: xwc1125 Package vmdb @author: xwc1125 Package vmdb @author: xwc1125 Package vmdb @author: xwc1125 Package vmdb @author: xwc1125 Package vmdb @author: xwc1125 Package vmdb @author: xwc1125 Package vmdb @author: xwc1125
|
Package vmdb @author: xwc1125 Package vmdb @author: xwc1125 Package vmdb @author: xwc1125 Package vmdb @author: xwc1125 Package vmdb @author: xwc1125 Package vmdb @author: xwc1125 Package vmdb @author: xwc1125 Package vmdb @author: xwc1125 |
model
Package model @author: xwc1125 Package model @author: xwc1125 Package model @author: xwc1125
|
Package model @author: xwc1125 Package model @author: xwc1125 Package model @author: xwc1125 |
Click to show internal directories.
Click to hide internal directories.