consensus/ethash: fix typos in var names (#24745)

pull/24776/head
John Difool 3 years ago committed by GitHub
parent 195c2d3d69
commit a52bcccfe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      consensus/ethash/consensus.go
  2. 4
      consensus/ethash/consensus_test.go
  3. 4
      tests/fuzzers/difficulty/difficulty-fuzz.go

@ -507,8 +507,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,

@ -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

@ -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)

Loading…
Cancel
Save