From 8f12d76a4723ba011d033533871a0e06e1243d7c Mon Sep 17 00:00:00 2001 From: Péter Szilágyi Date: Tue, 4 Jul 2017 12:28:58 +0300 Subject: params: remove redundant consts, disable metro on AllProtocolChanges --- tests/state_test.go | 46 +++++++++++++++++++++++----------------------- tests/vm_test_util.go | 4 ++-- 2 files changed, 25 insertions(+), 25 deletions(-) (limited to 'tests') diff --git a/tests/state_test.go b/tests/state_test.go index 97c4e5eeb..29180942b 100644 --- a/tests/state_test.go +++ b/tests/state_test.go @@ -684,7 +684,7 @@ func TestEIP158Create(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "stCreateTest.json") @@ -697,7 +697,7 @@ func TestEIP158Specific(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "stEIP158SpecificTest.json") @@ -710,7 +710,7 @@ func TestEIP158NonZeroCalls(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "stNonZeroCallsTest.json") @@ -723,7 +723,7 @@ func TestEIP158ZeroCalls(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "stZeroCallsTest.json") @@ -736,7 +736,7 @@ func TestEIP158_150Specific(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "EIP150", "stEIPSpecificTest.json") @@ -749,7 +749,7 @@ func TestEIP158_150SingleCodeGasPrice(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "EIP150", "stEIPsingleCodeGasPrices.json") @@ -762,7 +762,7 @@ func TestEIP158_150MemExpandingCalls(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "EIP150", "stMemExpandingEIPCalls.json") @@ -775,7 +775,7 @@ func TestEIP158HomesteadStateSystemOperations(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stSystemOperationsTest.json") @@ -788,7 +788,7 @@ func TestEIP158HomesteadStatePreCompiledContracts(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stPreCompiledContracts.json") @@ -801,7 +801,7 @@ func TestEIP158HomesteadStateRecursiveCreate(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stSpecialTest.json") @@ -814,7 +814,7 @@ func TestEIP158HomesteadStateRefund(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stRefundTest.json") @@ -827,7 +827,7 @@ func TestEIP158HomesteadStateInitCode(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stInitCodeTest.json") @@ -840,7 +840,7 @@ func TestEIP158HomesteadStateLog(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stLogTests.json") @@ -853,7 +853,7 @@ func TestEIP158HomesteadStateTransaction(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stTransactionTest.json") @@ -866,7 +866,7 @@ func TestEIP158HomesteadCallCreateCallCode(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stCallCreateCallCodeTest.json") @@ -879,7 +879,7 @@ func TestEIP158HomesteadCallCodes(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stCallCodes.json") @@ -892,7 +892,7 @@ func TestEIP158HomesteadMemory(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stMemoryTest.json") @@ -905,7 +905,7 @@ func TestEIP158HomesteadMemoryStress(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } if os.Getenv("TEST_VM_COMPLEX") == "" { @@ -921,7 +921,7 @@ func TestEIP158HomesteadQuadraticComplexity(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } if os.Getenv("TEST_VM_COMPLEX") == "" { @@ -937,7 +937,7 @@ func TestEIP158HomesteadWallet(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stWalletTest.json") @@ -950,7 +950,7 @@ func TestEIP158HomesteadDelegateCodes(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stCallDelegateCodes.json") @@ -963,7 +963,7 @@ func TestEIP158HomesteadDelegateCodesCallCode(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stCallDelegateCodesCallCode.json") @@ -976,7 +976,7 @@ func TestEIP158HomesteadBounds(t *testing.T) { chainConfig := ¶ms.ChainConfig{ HomesteadBlock: new(big.Int), EIP150Block: big.NewInt(2457000), - EIP158Block: params.MainNetSpuriousDragon, + EIP158Block: params.MainnetChainConfig.EIP158Block, } fn := filepath.Join(stateTestDir, "EIP158", "Homestead", "stBoundsTest.json") diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go index d2ddee039..e7fe74f49 100644 --- a/tests/vm_test_util.go +++ b/tests/vm_test_util.go @@ -215,8 +215,8 @@ func runVmTest(test VmTest) error { func RunVm(statedb *state.StateDB, env, exec map[string]string) ([]byte, []*types.Log, *big.Int, error) { chainConfig := ¶ms.ChainConfig{ - HomesteadBlock: params.MainNetHomesteadBlock, - DAOForkBlock: params.MainNetDAOForkBlock, + HomesteadBlock: params.MainnetChainConfig.HomesteadBlock, + DAOForkBlock: params.MainnetChainConfig.DAOForkBlock, DAOForkSupport: true, } var ( -- cgit