add diagnostic message to test_difficulty.nim
This commit is contained in:
parent
a45792cede
commit
8a09e97d4d
|
@ -50,7 +50,7 @@ template runTests(name: string, hex: bool, calculator: typed) =
|
||||||
ommersHash: t.parentUncles)
|
ommersHash: t.parentUncles)
|
||||||
|
|
||||||
let diff = calculator(times.fromUnix(t.currentTimeStamp), p)
|
let diff = calculator(times.fromUnix(t.currentTimeStamp), p)
|
||||||
test title:
|
test name & " " & title:
|
||||||
check diff == t.currentDifficulty
|
check diff == t.currentDifficulty
|
||||||
|
|
||||||
proc difficultyMain*() =
|
proc difficultyMain*() =
|
||||||
|
@ -60,3 +60,6 @@ proc difficultyMain*() =
|
||||||
runTests("Homestead", true, calcDifficultyHomestead)
|
runTests("Homestead", true, calcDifficultyHomestead)
|
||||||
runTests("Frontier", true, calcDifficultyFrontier)
|
runTests("Frontier", true, calcDifficultyFrontier)
|
||||||
runTests("", false, calcDifficulty)
|
runTests("", false, calcDifficulty)
|
||||||
|
|
||||||
|
when isMainModule:
|
||||||
|
difficultyMain()
|
||||||
|
|
Loading…
Reference in New Issue