浏览代码

consensus/ethash: fix TestCalcDifficulty

Felix Lange 8 年之前
父节点
当前提交
11cf5b7ead
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      consensus/ethash/consensus_test.go

+ 1 - 1
consensus/ethash/consensus_test.go

@@ -74,7 +74,7 @@ func TestCalcDifficulty(t *testing.T) {
 		number := new(big.Int).Sub(test.CurrentBlocknumber, big.NewInt(1))
 		diff := CalcDifficulty(config, test.CurrentTimestamp, &types.Header{
 			Number:     number,
-			Time:       test.ParentTimestamp,
+			Time:       new(big.Int).SetUint64(test.ParentTimestamp),
 			Difficulty: test.ParentDifficulty,
 		})
 		if diff.Cmp(test.CurrentDifficulty) != 0 {