Documentation ¶
Index ¶
- func NewChain(genesis *types.Block) *chain
- type MockStateDB
- func (s *MockStateDB) AddBalance(adr common.Address, amount *big.Int)
- func (s *MockStateDB) AddLog(*types.Log)
- func (s *MockStateDB) AddPreimage(common.Hash, []byte)
- func (s *MockStateDB) AddRefund(uint64)
- func (s *MockStateDB) CreateAccount(common.Address)
- func (s *MockStateDB) Empty(common.Address) bool
- func (s *MockStateDB) Exist(common.Address) bool
- func (s *MockStateDB) ForEachStorage(common.Address, func(common.Hash, common.Hash) bool)
- func (s *MockStateDB) GetAbi(common.Address) []byte
- func (s *MockStateDB) GetAbiHash(common.Address) common.Hash
- func (s *MockStateDB) GetBalance(adr common.Address) *big.Int
- func (s *MockStateDB) GetCode(common.Address) []byte
- func (s *MockStateDB) GetCodeHash(common.Address) common.Hash
- func (s *MockStateDB) GetCodeSize(common.Address) int
- func (s *MockStateDB) GetCommittedState(common.Address, []byte) []byte
- func (s *MockStateDB) GetNonce(common.Address) uint64
- func (s *MockStateDB) GetRefund() uint64
- func (s *MockStateDB) GetState(adr common.Address, key []byte) []byte
- func (s *MockStateDB) HasSuicided(common.Address) bool
- func (s *MockStateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash
- func (s *MockStateDB) Prepare(thash, bhash common.Hash, ti int)
- func (s *MockStateDB) RevertToSnapshot(int)
- func (s *MockStateDB) SetAbi(common.Address, []byte)
- func (s *MockStateDB) SetCode(common.Address, []byte)
- func (s *MockStateDB) SetNonce(common.Address, uint64)
- func (s *MockStateDB) SetState(adr common.Address, key, val []byte)
- func (s *MockStateDB) Snapshot() int
- func (s *MockStateDB) SubBalance(adr common.Address, amount *big.Int)
- func (s *MockStateDB) SubRefund(uint64)
- func (s *MockStateDB) Suicide(common.Address) bool
- func (s *MockStateDB) TxHash() common.Hash
- func (s *MockStateDB) TxIdx() uint32
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MockStateDB ¶
type MockStateDB struct { Balance map[common.Address]*big.Int State map[common.Address]map[string][]byte // contains filtered or unexported fields }
func (*MockStateDB) AddBalance ¶
func (s *MockStateDB) AddBalance(adr common.Address, amount *big.Int)
func (*MockStateDB) AddLog ¶
func (s *MockStateDB) AddLog(*types.Log)
func (*MockStateDB) AddPreimage ¶
func (s *MockStateDB) AddPreimage(common.Hash, []byte)
func (*MockStateDB) AddRefund ¶
func (s *MockStateDB) AddRefund(uint64)
func (*MockStateDB) CreateAccount ¶
func (s *MockStateDB) CreateAccount(common.Address)
func (*MockStateDB) Empty ¶
func (s *MockStateDB) Empty(common.Address) bool
Empty returns whether the given account is empty. Empty is defined according to EIP161 (balance = nonce = code = 0).
func (*MockStateDB) Exist ¶
func (s *MockStateDB) Exist(common.Address) bool
Exist reports whether the given account exists in state. Notably this should also return true for suicided accounts.
func (*MockStateDB) ForEachStorage ¶
func (*MockStateDB) GetAbiHash ¶
func (s *MockStateDB) GetAbiHash(common.Address) common.Hash
func (*MockStateDB) GetBalance ¶
func (s *MockStateDB) GetBalance(adr common.Address) *big.Int
func (*MockStateDB) GetCodeHash ¶
func (s *MockStateDB) GetCodeHash(common.Address) common.Hash
func (*MockStateDB) GetCodeSize ¶
func (s *MockStateDB) GetCodeSize(common.Address) int
func (*MockStateDB) GetCommittedState ¶
func (s *MockStateDB) GetCommittedState(common.Address, []byte) []byte
func (*MockStateDB) GetRefund ¶
func (s *MockStateDB) GetRefund() uint64
func (*MockStateDB) GetState ¶
func (s *MockStateDB) GetState(adr common.Address, key []byte) []byte
func (*MockStateDB) HasSuicided ¶
func (s *MockStateDB) HasSuicided(common.Address) bool
func (*MockStateDB) IntermediateRoot ¶
func (s *MockStateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash
func (*MockStateDB) RevertToSnapshot ¶
func (s *MockStateDB) RevertToSnapshot(int)
func (*MockStateDB) Snapshot ¶
func (s *MockStateDB) Snapshot() int
func (*MockStateDB) SubBalance ¶
func (s *MockStateDB) SubBalance(adr common.Address, amount *big.Int)
func (*MockStateDB) SubRefund ¶
func (s *MockStateDB) SubRefund(uint64)
func (*MockStateDB) TxHash ¶
func (s *MockStateDB) TxHash() common.Hash
func (*MockStateDB) TxIdx ¶
func (s *MockStateDB) TxIdx() uint32
Click to show internal directories.
Click to hide internal directories.