Documentation ¶
Index ¶
- type BalanceHandle
- type CacheDB
- func (self *CacheDB) CleanContractStorageData(addr web3.Address) error
- func (self *CacheDB) Commit()
- func (self *CacheDB) DelEthAccount(addr web3.Address)
- func (self *CacheDB) Delete(key []byte)
- func (self *CacheDB) GenAccountStateKey(addr web3.Address, key []byte) []byte
- func (self *CacheDB) Get(key []byte) ([]byte, error)
- func (self *CacheDB) GetEthAccount(addr web3.Address) (val EthAccount, err error)
- func (self *CacheDB) NewIterator(key []byte) schema.StoreIterator
- func (self *CacheDB) Put(key []byte, value []byte)
- func (self *CacheDB) PutEthAccount(addr web3.Address, val EthAccount)
- func (self *CacheDB) Reset()
- func (self *CacheDB) SetDbErr(err error)
- type EthAccount
- type Iter
- type StateDB
- func (self *StateDB) AddBalance(addr web3.Address, val *big.Int)
- func (self *StateDB) AddLog(log *web3.StorageLog)
- func (self *StateDB) AddPreimage(web3.Hash, []byte)
- func (self *StateDB) AddRefund(gas uint64)
- func (self *StateDB) BlockHash() web3.Hash
- func (self *StateDB) Commit() error
- func (self *StateDB) CommitToCacheDB() error
- func (self *StateDB) CreateAccount(web3.Address)
- func (self *StateDB) DbErr() error
- func (self *StateDB) Empty(addr web3.Address) bool
- func (self *StateDB) Exist(addr web3.Address) bool
- func (self *StateDB) ForEachStorage(web3.Address, func(web3.Hash, web3.Hash) bool) error
- func (self *StateDB) GetBalance(addr web3.Address) *big.Int
- func (self *StateDB) GetCode(addr web3.Address) []byte
- func (self *StateDB) GetCodeHash(addr web3.Address) (hash web3.Hash)
- func (self *StateDB) GetCodeSize(addr web3.Address) int
- func (self *StateDB) GetCommittedState(addr web3.Address, key web3.Hash) web3.Hash
- func (self *StateDB) GetLogs() []*web3.StorageLog
- func (self *StateDB) GetNonce(addr web3.Address) uint64
- func (self *StateDB) GetRefund() uint64
- func (self *StateDB) GetState(contract web3.Address, key web3.Hash) web3.Hash
- func (self *StateDB) HasSuicided(addr web3.Address) bool
- func (self *StateDB) Prepare(thash, bhash web3.Hash)
- func (self *StateDB) RevertToSnapshot(idx int)
- func (self *StateDB) SetCode(addr web3.Address, code []byte)
- func (self *StateDB) SetNonce(addr web3.Address, nonce uint64)
- func (self *StateDB) SetState(contract web3.Address, key, value web3.Hash)
- func (self *StateDB) Snapshot() int
- func (self *StateDB) SubBalance(addr web3.Address, val *big.Int)
- func (self *StateDB) SubRefund(gas uint64)
- func (self *StateDB) Suicide(addr web3.Address) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalanceHandle ¶
type CacheDB ¶
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 ¶
NewCacheDB return a new contract cache
func (*CacheDB) CleanContractStorageData ¶
func (*CacheDB) Commit ¶
func (self *CacheDB) Commit()
Commit current transaction cache to block cache
func (*CacheDB) DelEthAccount ¶
func (*CacheDB) GenAccountStateKey ¶
func (*CacheDB) GetEthAccount ¶
func (self *CacheDB) GetEthAccount(addr web3.Address) (val EthAccount, err error)
func (*CacheDB) NewIterator ¶
func (self *CacheDB) NewIterator(key []byte) schema.StoreIterator
func (*CacheDB) PutEthAccount ¶
func (self *CacheDB) PutEthAccount(addr web3.Address, val EthAccount)
type EthAccount ¶
func (*EthAccount) Deserialization ¶
func (self *EthAccount) Deserialization(source *codec.ZeroCopySource) error
func (*EthAccount) IsEmpty ¶
func (self *EthAccount) IsEmpty() bool
func (*EthAccount) Serialization ¶
func (self *EthAccount) Serialization(sink *codec.ZeroCopySink)
type StateDB ¶
type StateDB struct { Suicided map[web3.Address]bool BalanceHandle BalanceHandle // contains filtered or unexported fields }
func (*StateDB) AddLog ¶
func (self *StateDB) AddLog(log *web3.StorageLog)
func (*StateDB) CommitToCacheDB ¶
func (*StateDB) CreateAccount ¶
func (*StateDB) ForEachStorage ¶
func (*StateDB) GetCommittedState ¶
func (*StateDB) GetLogs ¶
func (self *StateDB) GetLogs() []*web3.StorageLog
func (*StateDB) RevertToSnapshot ¶
Directories ¶
Path | Synopsis |
---|---|
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
|
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library. |
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
|
* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library. |
Click to show internal directories.
Click to hide internal directories.