add ropsten difficulty test

This commit is contained in:
andri lim 2020-04-12 18:09:18 +07:00
parent 87bae2bb78
commit 5ca7370407
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
2 changed files with 20294 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -65,6 +65,10 @@ proc difficultyMain*() =
func calcDifficultyMainNetWork(timeStamp: EthTime, parent: BlockHeader): DifficultyInt =
mainnetConfig.calcDifficulty(timeStamp, parent)
let ropstenConfig = publicChainConfig(RopstenNet)
func calcDifficultyRopsten(timeStamp: EthTime, parent: BlockHeader): DifficultyInt =
ropstenConfig.calcDifficulty(timeStamp, parent)
suite "DifficultyTest":
runTests("EIP2384_random_to20M", true, calcDifficultyGlacierMuir)
runTests("EIP2384_random", true, calcDifficultyGlacierMuir)
@ -75,6 +79,7 @@ proc difficultyMain*() =
runTests("MainNetwork", true, calcDifficultyMainNetwork)
runTests("Frontier", true, calcDifficultyFrontier)
runTests("", false, calcDifficultyMainNetWork)
runTests("Ropsten", true, calcDifficultyRopsten)
when isMainModule:
difficultyMain()