Documentation
¶
Overview ¶
Package tests implements execution of QRL JSON tests.
Index ¶
- Variables
- func AvailableForks() []string
- func GetChainConfig(forkString string) (baseConfig *params.ChainConfig, qips []int, err error)
- func MakePreState(db qrldb.Database, accounts core.GenesisAlloc, snapshotter bool, scheme string) (*trie.Database, *snapshot.Tree, *state.StateDB)
- type BlockTest
- type StateSubtest
- type StateTest
- func (t *StateTest) Run(subtest StateSubtest, vmconfig vm.Config, snapshotter bool, scheme string, ...) (result error)
- func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config, snapshotter bool, scheme string) (*trie.Database, *snapshot.Tree, *state.StateDB, common.Hash, error)
- func (t *StateTest) Subtests() []StateSubtest
- func (t *StateTest) UnmarshalJSON(in []byte) error
- type UnsupportedForkError
Constants ¶
This section is empty.
Variables ¶
var Forks = map[string]*params.ChainConfig{ "Zond": { ChainID: big.NewInt(1), }, }
Forks table defines supported forks and their chain config.
Functions ¶
func AvailableForks ¶
func AvailableForks() []string
AvailableForks returns the set of defined fork names
func GetChainConfig ¶
func GetChainConfig(forkString string) (baseConfig *params.ChainConfig, qips []int, err error)
GetChainConfig takes a fork definition and returns a chain config. The fork definition can be - a plain forkname, e.g. `Byzantium`, - a fork basename, and a list of QIPs to enable; e.g. `Byzantium+1884+1283`.
Types ¶
type BlockTest ¶
type BlockTest struct {
// contains filtered or unexported fields
}
A BlockTest checks handling of entire blocks.
func (*BlockTest) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface.
type StateSubtest ¶
StateSubtest selects a specific configuration of a General State Test.
type StateTest ¶
type StateTest struct {
// contains filtered or unexported fields
}
StateTest checks transaction processing without block context. See https://github.com/ethereum/EIPs/issues/176 for the test format specification.
func (*StateTest) Run ¶
func (t *StateTest) Run(subtest StateSubtest, vmconfig vm.Config, snapshotter bool, scheme string, postCheck func(err error, snaps *snapshot.Tree, state *state.StateDB)) (result error)
Run executes a specific subtest and verifies the post-state and logs
func (*StateTest) RunNoVerify ¶
func (t *StateTest) RunNoVerify(subtest StateSubtest, vmconfig vm.Config, snapshotter bool, scheme string) (*trie.Database, *snapshot.Tree, *state.StateDB, common.Hash, error)
RunNoVerify runs a specific subtest and returns the statedb and post-state root
func (*StateTest) Subtests ¶
func (t *StateTest) Subtests() []StateSubtest
Subtests returns all valid subtests of the test.
func (*StateTest) UnmarshalJSON ¶
type UnsupportedForkError ¶
type UnsupportedForkError struct {
Name string
}
UnsupportedForkError is returned when a test requests a fork that isn't implemented.
func (UnsupportedForkError) Error ¶
func (e UnsupportedForkError) Error() string