add diagnostic message to test_difficulty.nim

This commit is contained in:
andri lim 2019-10-26 08:24:05 +07:00
parent a45792cede
commit 8a09e97d4d
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 4 additions and 1 deletions

View File

@ -50,7 +50,7 @@ template runTests(name: string, hex: bool, calculator: typed) =
ommersHash: t.parentUncles)
let diff = calculator(times.fromUnix(t.currentTimeStamp), p)
test title:
test name & " " & title:
check diff == t.currentDifficulty
proc difficultyMain*() =
@ -60,3 +60,6 @@ proc difficultyMain*() =
runTests("Homestead", true, calcDifficultyHomestead)
runTests("Frontier", true, calcDifficultyFrontier)
runTests("", false, calcDifficulty)
when isMainModule:
difficultyMain()