Skip to content

Commit

Permalink
consensus/ethash: fix typos in var names (ethereum#24745)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-difool authored and jagdeep sidhu committed May 5, 2022
1 parent 567fd5c commit e465963
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions consensus/ethash/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions consensus/ethash/consensus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/fuzzers/difficulty/difficulty-fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e465963

Please sign in to comment.