diff --git a/tests/difficulty_test_util.go b/tests/difficulty_test_util.go index b012b370fe..9ef1503aff 100644 --- a/tests/difficulty_test_util.go +++ b/tests/difficulty_test_util.go @@ -24,7 +24,7 @@ import ( "github.com/ubiq/go-ubiq/common" "github.com/ubiq/go-ubiq/common/math" "github.com/ubiq/go-ubiq/consensus/ubqhash" - "github.com/ubiq/go-ubiq/core/types" + //"github.com/ubiq/go-ubiq/core/types" "github.com/ubiq/go-ubiq/params" ) @@ -50,14 +50,14 @@ type difficultyTestMarshaling struct { func (test *DifficultyTest) Run(config *params.ChainConfig) error { parentNumber := big.NewInt(int64(test.CurrentBlockNumber - 1)) - parent := &types.Header{ + /*parent := &types.Header{ Difficulty: test.ParentDifficulty, Time: test.ParentTimestamp, Number: parentNumber, UncleHash: test.UncleHash, - } + }*/ - actual := ubqhash.CalcDifficulty(config, test.CurrentTimestamp.Uint64(), parent) + actual := ubqhash.CalcDifficultyLegacy(test.CurrentTimestamp.Uint64(), test.ParentTimestamp.Uint64(), parentNumber, test.ParentDifficulty) exp := test.CurrentDifficulty if actual.Cmp(exp) != 0 {