diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-08-11 20:23:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-11 20:23:22 +0800 |
commit | 6ca59d98f88d4b4cc8bdeb2f023ff8c1fa228c6f (patch) | |
tree | 7b0570a6131a59e298df8eb2fbefedd520575b0e /tests/state_test_util.go | |
parent | 833eeb9f23e6808377f0414f0db4a731b134fe9f (diff) | |
parent | 6a56b15019271f5a16406c7e1be50d581f8efcab (diff) | |
download | dexon-6ca59d98f88d4b4cc8bdeb2f023ff8c1fa228c6f.tar dexon-6ca59d98f88d4b4cc8bdeb2f023ff8c1fa228c6f.tar.gz dexon-6ca59d98f88d4b4cc8bdeb2f023ff8c1fa228c6f.tar.bz2 dexon-6ca59d98f88d4b4cc8bdeb2f023ff8c1fa228c6f.tar.lz dexon-6ca59d98f88d4b4cc8bdeb2f023ff8c1fa228c6f.tar.xz dexon-6ca59d98f88d4b4cc8bdeb2f023ff8c1fa228c6f.tar.zst dexon-6ca59d98f88d4b4cc8bdeb2f023ff8c1fa228c6f.zip |
Merge pull request #14964 from fjl/tests-update-2
tests: update tests, use blockchain test "network" field
Diffstat (limited to 'tests/state_test_util.go')
-rw-r--r-- | tests/state_test_util.go | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/tests/state_test_util.go b/tests/state_test_util.go index 5c7ed5d67..2bf940bab 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -37,37 +37,6 @@ import ( "github.com/ethereum/go-ethereum/params" ) -// This table defines supported forks and their chain config. -var stateTestForks = map[string]*params.ChainConfig{ - "Frontier": ¶ms.ChainConfig{ - ChainId: big.NewInt(1), - }, - "Homestead": ¶ms.ChainConfig{ - HomesteadBlock: big.NewInt(0), - ChainId: big.NewInt(1), - }, - "EIP150": ¶ms.ChainConfig{ - HomesteadBlock: big.NewInt(0), - EIP150Block: big.NewInt(0), - ChainId: big.NewInt(1), - }, - "EIP158": ¶ms.ChainConfig{ - HomesteadBlock: big.NewInt(0), - EIP150Block: big.NewInt(0), - EIP155Block: big.NewInt(0), - EIP158Block: big.NewInt(0), - ChainId: big.NewInt(1), - }, - "Metropolis": ¶ms.ChainConfig{ - HomesteadBlock: big.NewInt(0), - EIP150Block: big.NewInt(0), - EIP155Block: big.NewInt(0), - EIP158Block: big.NewInt(0), - MetropolisBlock: big.NewInt(0), - ChainId: big.NewInt(1), - }, -} - // StateTest checks transaction processing without block context. // See https://github.com/ethereum/EIPs/issues/176 for the test format specification. type StateTest struct { @@ -167,9 +136,9 @@ func (t *StateTest) Subtests() []StateSubtest { // Run executes a specific subtest. func (t *StateTest) Run(subtest StateSubtest, vmconfig vm.Config) error { - config, ok := stateTestForks[subtest.Fork] + config, ok := Forks[subtest.Fork] if !ok { - return fmt.Errorf("no config for fork %q", subtest.Fork) + return UnsupportedForkError{subtest.Fork} } block, _ := t.genesis(config).ToBlock() db, _ := ethdb.NewMemDatabase() |