Documentation ¶
Index ¶
- type CacheDB
- func (self *CacheDB) CleanContractStorage(addr comm.Address, height uint32) error
- func (self *CacheDB) CleanContractStorageData(addr comm.Address) error
- func (self *CacheDB) Commit()
- func (self *CacheDB) DelEthAccount(addr common.Address)
- func (self *CacheDB) Delete(key []byte)
- func (self *CacheDB) DeleteContract(address comm.Address, height uint32)
- func (self *CacheDB) GenAccountStateKey(addr comm.Address, key []byte) []byte
- func (self *CacheDB) Get(key []byte) ([]byte, error)
- func (self *CacheDB) GetContract(addr comm.Address) (*payload.DeployCode, bool, error)
- func (self *CacheDB) GetEthAccount(addr common.Address) (val EthAccount, err error)
- func (self *CacheDB) GetEthCode(codeHash common.Hash) (val []byte, err error)
- func (self *CacheDB) IsContractDestroyed(addr comm.Address) (bool, error)
- func (self *CacheDB) MigrateContractStorage(oldAddress, newAddress comm.Address, height uint32) error
- func (self *CacheDB) NewIterator(key []byte) common.StoreIterator
- func (self *CacheDB) Put(key []byte, value []byte)
- func (self *CacheDB) PutContract(contract *payload.DeployCode)
- func (self *CacheDB) PutEthAccount(addr common.Address, val EthAccount)
- func (self *CacheDB) PutEthCode(codeHash common.Hash, val []byte)
- func (self *CacheDB) Reset()
- func (self *CacheDB) SetContractDestroyed(addr comm.Address, height uint32)
- func (self *CacheDB) SetDbErr(err error)
- func (self *CacheDB) UnsetContractDestroyed(addr comm.Address, height uint32)
- type EthAccount
- type Iter
- type OngBalanceHandle
- type StateDB
- func (self *StateDB) AddBalance(addr common.Address, val *big.Int)
- func (self *StateDB) AddLog(log *types.StorageLog)
- func (self *StateDB) AddPreimage(common.Hash, []byte)
- func (self *StateDB) AddRefund(gas uint64)
- func (self *StateDB) BlockHash() common.Hash
- func (self *StateDB) Commit() error
- func (self *StateDB) CommitToCacheDB() error
- func (self *StateDB) CreateAccount(address common.Address)
- func (self *StateDB) DbErr() error
- func (self *StateDB) DiscardSnapshot(idx int)
- func (self *StateDB) Empty(addr common.Address) bool
- func (self *StateDB) Exist(addr common.Address) bool
- func (self *StateDB) ForEachStorage(common.Address, func(common.Hash, common.Hash) bool) error
- func (self *StateDB) GetBalance(addr common.Address) *big.Int
- func (self *StateDB) GetCode(addr common.Address) []byte
- func (self *StateDB) GetCodeHash(addr common.Address) (hash common.Hash)
- func (self *StateDB) GetCodeSize(addr common.Address) int
- func (self *StateDB) GetCommittedState(addr common.Address, key common.Hash) common.Hash
- func (self *StateDB) GetLogs() []*types.StorageLog
- func (self *StateDB) GetNonce(addr common.Address) uint64
- func (self *StateDB) GetRefund() uint64
- func (self *StateDB) GetState(contract common.Address, key common.Hash) common.Hash
- func (self *StateDB) HasSuicided(addr common.Address) bool
- func (self *StateDB) Prepare(thash, bhash common.Hash)
- func (self *StateDB) RevertToSnapshot(idx int)
- func (self *StateDB) SetCode(addr common.Address, code []byte)
- func (self *StateDB) SetNonce(addr common.Address, nonce uint64)
- func (self *StateDB) SetState(contract common.Address, key, value common.Hash)
- func (self *StateDB) Snapshot() int
- func (self *StateDB) SubBalance(addr common.Address, val *big.Int)
- func (self *StateDB) SubRefund(gas uint64)
- func (self *StateDB) Suicide(addr common.Address) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheDB ¶ added in v1.5.1
type CacheDB struct {
// contains filtered or unexported fields
}
CacheDB is smart contract execute cache, it contain transaction cache and block cache When smart contract execute finish, need to commit transaction cache to block cache
func NewCacheDB ¶ added in v1.5.1
NewCacheDB return a new contract cache
func (*CacheDB) CleanContractStorage ¶ added in v1.13.0
func (*CacheDB) CleanContractStorageData ¶ added in v1.14.1
func (*CacheDB) Commit ¶ added in v1.5.1
func (self *CacheDB) Commit()
Commit current transaction cache to block cache
func (*CacheDB) DelEthAccount ¶ added in v1.14.1
func (*CacheDB) DeleteContract ¶ added in v1.5.1
func (*CacheDB) GenAccountStateKey ¶ added in v1.14.1
func (*CacheDB) GetContract ¶ added in v1.5.1
func (*CacheDB) GetEthAccount ¶ added in v1.14.1
func (self *CacheDB) GetEthAccount(addr common.Address) (val EthAccount, err error)
func (*CacheDB) GetEthCode ¶ added in v1.14.1
func (*CacheDB) IsContractDestroyed ¶ added in v1.13.0
func (*CacheDB) MigrateContractStorage ¶ added in v1.13.0
func (*CacheDB) NewIterator ¶ added in v1.5.1
func (self *CacheDB) NewIterator(key []byte) common.StoreIterator
func (*CacheDB) PutContract ¶ added in v1.5.1
func (self *CacheDB) PutContract(contract *payload.DeployCode)
func (*CacheDB) PutEthAccount ¶ added in v1.14.1
func (self *CacheDB) PutEthAccount(addr common.Address, val EthAccount)
func (*CacheDB) PutEthCode ¶ added in v1.14.1
func (*CacheDB) SetContractDestroyed ¶ added in v1.13.0
type EthAccount ¶ added in v1.14.1
func (*EthAccount) Deserialization ¶ added in v1.14.1
func (self *EthAccount) Deserialization(source *comm.ZeroCopySource) error
func (*EthAccount) IsEmpty ¶ added in v1.14.1
func (self *EthAccount) IsEmpty() bool
func (*EthAccount) IsEmptyContract ¶ added in v1.14.3
func (self *EthAccount) IsEmptyContract() bool
func (*EthAccount) Serialization ¶ added in v1.14.1
func (self *EthAccount) Serialization(sink *comm.ZeroCopySink)
type OngBalanceHandle ¶ added in v1.14.1
type StateDB ¶ added in v1.14.1
type StateDB struct { Suicided map[common.Address]bool OngBalanceHandle OngBalanceHandle // contains filtered or unexported fields }
func NewStateDB ¶ added in v1.14.1
func NewStateDB(cacheDB *CacheDB, thash, bhash common.Hash, balanceHandle OngBalanceHandle) *StateDB
func (*StateDB) AddBalance ¶ added in v1.14.1
func (*StateDB) AddLog ¶ added in v1.14.1
func (self *StateDB) AddLog(log *types.StorageLog)
func (*StateDB) AddPreimage ¶ added in v1.14.1
func (*StateDB) CommitToCacheDB ¶ added in v1.14.1
func (*StateDB) CreateAccount ¶ added in v1.14.1
func (*StateDB) DiscardSnapshot ¶ added in v1.17.0
func (*StateDB) ForEachStorage ¶ added in v1.14.1
func (*StateDB) GetBalance ¶ added in v1.14.1
func (*StateDB) GetCodeHash ¶ added in v1.14.1
func (*StateDB) GetCodeSize ¶ added in v1.14.1
func (*StateDB) GetCommittedState ¶ added in v1.14.1
func (*StateDB) GetLogs ¶ added in v1.14.1
func (self *StateDB) GetLogs() []*types.StorageLog
func (*StateDB) GetRefund ¶ added in v1.14.1
GetRefund returns the current value of the refund counter.
func (*StateDB) HasSuicided ¶ added in v1.14.1
func (*StateDB) RevertToSnapshot ¶ added in v1.14.1
func (*StateDB) SubBalance ¶ added in v1.14.1
Click to show internal directories.
Click to hide internal directories.