From e46596334de6507fc7fc40d88900dc9cd3760162 Mon Sep 17 00:00:00 2001 From: John Difool Date: Tue, 26 Apr 2022 18:16:57 +1000 Subject: [PATCH] consensus/ethash: fix typos in var names (#24745) --- consensus/ethash/consensus.go | 4 ++-- consensus/ethash/consensus_test.go | 4 ++-- tests/fuzzers/difficulty/difficulty-fuzz.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/consensus/ethash/consensus.go b/consensus/ethash/consensus.go index 19a4099ea6bd..296a3279fe63 100644 --- a/consensus/ethash/consensus.go +++ b/consensus/ethash/consensus.go @@ -529,8 +529,8 @@ func calcDifficultyFrontier(time uint64, parent *types.Header) *big.Int { } // Exported for fuzzing -var FrontierDifficultyCalulator = calcDifficultyFrontier -var HomesteadDifficultyCalulator = calcDifficultyHomestead +var FrontierDifficultyCalculator = calcDifficultyFrontier +var HomesteadDifficultyCalculator = calcDifficultyHomestead var DynamicDifficultyCalculator = makeDifficultyCalculator // verifySeal checks whether a block satisfies the PoW difficulty requirements, diff --git a/consensus/ethash/consensus_test.go b/consensus/ethash/consensus_test.go index 6f6dc79fd86b..bca424af30e3 100644 --- a/consensus/ethash/consensus_test.go +++ b/consensus/ethash/consensus_test.go @@ -121,8 +121,8 @@ func TestDifficultyCalculators(t *testing.T) { bigFn func(time uint64, parent *types.Header) *big.Int u256Fn func(time uint64, parent *types.Header) *big.Int }{ - {FrontierDifficultyCalulator, CalcDifficultyFrontierU256}, - {HomesteadDifficultyCalulator, CalcDifficultyHomesteadU256}, + {FrontierDifficultyCalculator, CalcDifficultyFrontierU256}, + {HomesteadDifficultyCalculator, CalcDifficultyHomesteadU256}, {DynamicDifficultyCalculator(bombDelay), MakeDifficultyCalculatorU256(bombDelay)}, } { time := header.Time + timeDelta diff --git a/tests/fuzzers/difficulty/difficulty-fuzz.go b/tests/fuzzers/difficulty/difficulty-fuzz.go index e4c5dcf57cbc..58936fcd80b1 100644 --- a/tests/fuzzers/difficulty/difficulty-fuzz.go +++ b/tests/fuzzers/difficulty/difficulty-fuzz.go @@ -130,8 +130,8 @@ func (f *fuzzer) fuzz() int { bigFn calculator u256Fn calculator }{ - {ethash.FrontierDifficultyCalulator, ethash.CalcDifficultyFrontierU256}, - {ethash.HomesteadDifficultyCalulator, ethash.CalcDifficultyHomesteadU256}, + {ethash.FrontierDifficultyCalculator, ethash.CalcDifficultyFrontierU256}, + {ethash.HomesteadDifficultyCalculator, ethash.CalcDifficultyHomesteadU256}, {ethash.DynamicDifficultyCalculator(bombDelay), ethash.MakeDifficultyCalculatorU256(bombDelay)}, } { want := pair.bigFn(time, header)