Documentation
¶
Index ¶
- Variables
- func LoadBlockTests(file string) (map[string]*BlockTest, error)
- func RunBlockTest(file string, skipTests []string) error
- func RunBlockTestWithReader(r io.Reader, skipTests []string) error
- func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.Logs, *big.Int, error)
- func RunStateTest(p string, skipTests []string) error
- func RunStateTestWithReader(r io.Reader, skipTests []string) error
- func RunTransactionTests(file string, skipTests []string) error
- func RunTransactionTestsWithReader(r io.Reader, skipTests []string) error
- func RunVm(state *state.StateDB, env, exec map[string]string) ([]byte, state.Logs, *big.Int, error)
- func RunVmTest(p string, skipTests []string) error
- func RunVmTestWithReader(r io.Reader, skipTests []string) error
- func StateObjectFromAccount(db common.Database, addr string, account Account) *state.StateObject
- type Account
- type BlockTest
- type Env
- func (self *Env) AddLog(log *state.Log)
- func (self *Env) AddStructLog(log vm.StructLog)
- func (self *Env) BlockNumber() *big.Int
- func (self *Env) Call(caller vm.ContextRef, addr common.Address, data []byte, ...) ([]byte, error)
- func (self *Env) CallCode(caller vm.ContextRef, addr common.Address, data []byte, ...) ([]byte, error)
- func (self *Env) Coinbase() common.Address
- func (self *Env) Create(caller vm.ContextRef, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ContextRef)
- func (self *Env) Depth() int
- func (self *Env) Difficulty() *big.Int
- func (self *Env) GasLimit() *big.Int
- func (self *Env) GetHash(n uint64) common.Hash
- func (self *Env) Origin() common.Address
- func (self *Env) SetDepth(i int)
- func (self *Env) State() *state.StateDB
- func (self *Env) StructLogs() []vm.StructLog
- func (self *Env) Time() int64
- func (self *Env) Transfer(from, to vm.Account, amount *big.Int) error
- func (self *Env) VmType() vm.Type
- type Log
- type Message
- func (self Message) Data() []byte
- func (self Message) From() (common.Address, error)
- func (self Message) Gas() *big.Int
- func (self Message) GasPrice() *big.Int
- func (self Message) Hash() []byte
- func (self Message) Nonce() uint64
- func (self Message) To() *common.Address
- func (self Message) Value() *big.Int
- type TransactionTest
- type TtTransaction
- type VmEnv
- type VmTest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BlockSkipTests = []string{"SimpleTx3"} TransSkipTests = []string{"TransactionWithHihghNonce256"} StateSkipTests = []string{"mload32bitBound_return", "mload32bitBound_return2"} VmSkipTests = []string{} )
Functions ¶
func RunBlockTest ¶
func RunStateTest ¶
func RunTransactionTests ¶
func StateObjectFromAccount ¶
Types ¶
type BlockTest ¶
type BlockTest struct { Genesis *types.Block Json *btJSON // contains filtered or unexported fields }
Block Test JSON Format
func (*BlockTest) InsertPreState ¶
InsertPreState populates the given database with the genesis accounts defined by the test.
func (*BlockTest) TryBlocksInsert ¶
func (t *BlockTest) TryBlocksInsert(chainManager *core.ChainManager) error
See https://github.com/ethereum/tests/wiki/Blockchain-Tests-II
Whether a block is valid or not is a bit subtle, it's defined by presence of blockHeader, transactions and uncleHeaders fields. If they are missing, the block is invalid and we must verify that we do not accept it. Since some tests mix valid and invalid blocks we need to check this for every block. If a block is invalid it does not necessarily fail the test, if it's invalidness is expected we are expected to ignore it and continue processing and then validate the post state.
type Env ¶
func NewEnvFromMap ¶
func (*Env) AddStructLog ¶
func (*Env) BlockNumber ¶
func (*Env) Create ¶
func (self *Env) Create(caller vm.ContextRef, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ContextRef)
func (*Env) Difficulty ¶
func (*Env) StructLogs ¶
type Log ¶
type TransactionTest ¶
type TransactionTest struct { Rlp string Sender string Transaction TtTransaction }
type TtTransaction ¶
type TtTransaction struct { Data string GasLimit string GasPrice string Nonce string R string S string To string V string Value string }
Transaction Test JSON Format
Click to show internal directories.
Click to hide internal directories.