diff --git a/tests/difficulty_test.go b/tests/difficulty_test.go index 6bcb7c46f7..a449b1cfa6 100644 --- a/tests/difficulty_test.go +++ b/tests/difficulty_test.go @@ -20,9 +20,10 @@ package tests import ( "testing" + "math/big" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/params" - "math/big" ) var ( diff --git a/tests/difficulty_test_util.go b/tests/difficulty_test_util.go index 805367e397..7541477933 100644 --- a/tests/difficulty_test_util.go +++ b/tests/difficulty_test_util.go @@ -19,17 +19,16 @@ package tests import ( "fmt" + "math/big" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/consensus/ethash" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - "math/big" ) -type DifficultyTests map[string]DifficultyTest - -//go:generate gencodec -type DifficultyTest -field-override DifficultyTestMarshaling -out gen_difficultytest.go +//go:generate gencodec -type DifficultyTest -field-override difficultyTestMarshaling -out gen_difficultytest.go type DifficultyTest struct { ParentTimestamp *big.Int `json:"parentTimestamp"` @@ -40,7 +39,7 @@ type DifficultyTest struct { CurrentDifficulty *big.Int `json:"currentDifficulty"` } -type DifficultyTestMarshaling struct { +type difficultyTestMarshaling struct { ParentTimestamp *math.HexOrDecimal256 ParentDifficulty *math.HexOrDecimal256 CurrentTimestamp *math.HexOrDecimal256 @@ -50,7 +49,6 @@ type DifficultyTestMarshaling struct { } func (test *DifficultyTest) Run(config *params.ChainConfig) error { - parentNumber := big.NewInt(int64(test.CurrentBlockNumber - 1)) parent := &types.Header{ Difficulty: test.ParentDifficulty, diff --git a/tests/gen_difficultytest.go b/tests/gen_difficultytest.go index fb241f504d..88f36ce999 100644 --- a/tests/gen_difficultytest.go +++ b/tests/gen_difficultytest.go @@ -10,7 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common/math" ) -var _ = (*DifficultyTestMarshaling)(nil) +var _ = (*difficultyTestMarshaling)(nil) func (d DifficultyTest) MarshalJSON() ([]byte, error) { type DifficultyTest struct {