From de424f357e78fc28fafec08147e8f99c1868f51c Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Thu, 5 Dec 2019 10:57:10 +0100 Subject: [PATCH] params/config: address review concerns --- consensus/ethash/consensus.go | 2 +- params/config.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/consensus/ethash/consensus.go b/consensus/ethash/consensus.go index 077c736926..270c5358dd 100644 --- a/consensus/ethash/consensus.go +++ b/consensus/ethash/consensus.go @@ -316,7 +316,7 @@ func (ethash *Ethash) CalcDifficulty(chain consensus.ChainReader, time uint64, p func CalcDifficulty(config *params.ChainConfig, time uint64, parent *types.Header) *big.Int { next := new(big.Int).Add(parent.Number, big1) switch { - case config.IsEip2384(next): + case config.IsMuirGlacier(next): return calcDifficultyEip2384(time, parent) case config.IsConstantinople(next): return calcDifficultyConstantinople(time, parent) diff --git a/params/config.go b/params/config.go index 62554cc8fb..9b3935bc90 100644 --- a/params/config.go +++ b/params/config.go @@ -384,8 +384,8 @@ func (c *ChainConfig) IsConstantinople(num *big.Int) bool { return isForked(c.ConstantinopleBlock, num) } -// IsEip2384 returns whether num is equal or greater than the EIP 2384 block -func (c *ChainConfig) IsEip2384(num *big.Int) bool { +// IsMuirGlacier returns whether num is either equal to the Muir Glacier (EIP-2384) fork block or greater. +func (c *ChainConfig) IsMuirGlacier(num *big.Int) bool { return isForked(c.EIP2384Block, num) }