diff --git a/nimbus/utils/difficulty.nim b/nimbus/utils/difficulty.nim index 198c369f6..11b58db9a 100644 --- a/nimbus/utils/difficulty.nim +++ b/nimbus/utils/difficulty.nim @@ -141,13 +141,13 @@ template calcDifficultyByzantium*(timeStamp: EthTime, parent: BlockHeader): Diff template calcDifficultyConstantinople*(timeStamp: EthTime, parent: BlockHeader): DifficultyInt = makeDifficultyCalculator(5_000_000, timeStamp, parent) -template calcDifficultyGlacierMuir*(timeStamp: EthTime, parent: BlockHeader): DifficultyInt = +template calcDifficultyMuirGlacier*(timeStamp: EthTime, parent: BlockHeader): DifficultyInt = makeDifficultyCalculator(9_000_000, timeStamp, parent) func calcDifficulty*(c: ChainConfig, timeStamp: EthTime, parent: BlockHeader): DifficultyInt = let next = parent.blockNumber + bigOne if next >= c.muirGlacierBlock: - result = calcDifficultyGlacierMuir(timeStamp, parent) + result = calcDifficultyMuirGlacier(timeStamp, parent) elif next >= c.constantinopleBlock: result = calcDifficultyConstantinople(timeStamp, parent) elif next >= c.byzantiumBlock: diff --git a/tests/test_difficulty.nim b/tests/test_difficulty.nim index b13e5d142..d7b53c6e9 100644 --- a/tests/test_difficulty.nim +++ b/tests/test_difficulty.nim @@ -70,9 +70,9 @@ proc difficultyMain*() = ropstenConfig.calcDifficulty(timeStamp, parent) suite "DifficultyTest": - runTests("EIP2384_random_to20M", true, calcDifficultyGlacierMuir) - runTests("EIP2384_random", true, calcDifficultyGlacierMuir) - runTests("EIP2384", true, calcDifficultyGlacierMuir) + runTests("EIP2384_random_to20M", true, calcDifficultyMuirGlacier) + runTests("EIP2384_random", true, calcDifficultyMuirGlacier) + runTests("EIP2384", true, calcDifficultyMuirGlacier) runTests("Byzantium", true, calcDifficultyByzantium) runTests("Constantinople", true, calcDifficultyConstantinople) runTests("Homestead", true, calcDifficultyHomestead)