Patch for concurrent iterator & others (onto v1.11.6) #386
@ -507,8 +507,8 @@ func calcDifficultyFrontier(time uint64, parent *types.Header) *big.Int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Exported for fuzzing
|
// Exported for fuzzing
|
||||||
var FrontierDifficultyCalulator = calcDifficultyFrontier
|
var FrontierDifficultyCalculator = calcDifficultyFrontier
|
||||||
var HomesteadDifficultyCalulator = calcDifficultyHomestead
|
var HomesteadDifficultyCalculator = calcDifficultyHomestead
|
||||||
var DynamicDifficultyCalculator = makeDifficultyCalculator
|
var DynamicDifficultyCalculator = makeDifficultyCalculator
|
||||||
|
|
||||||
// verifySeal checks whether a block satisfies the PoW difficulty requirements,
|
// 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
|
bigFn func(time uint64, parent *types.Header) *big.Int
|
||||||
u256Fn func(time uint64, parent *types.Header) *big.Int
|
u256Fn func(time uint64, parent *types.Header) *big.Int
|
||||||
}{
|
}{
|
||||||
{FrontierDifficultyCalulator, CalcDifficultyFrontierU256},
|
{FrontierDifficultyCalculator, CalcDifficultyFrontierU256},
|
||||||
{HomesteadDifficultyCalulator, CalcDifficultyHomesteadU256},
|
{HomesteadDifficultyCalculator, CalcDifficultyHomesteadU256},
|
||||||
{DynamicDifficultyCalculator(bombDelay), MakeDifficultyCalculatorU256(bombDelay)},
|
{DynamicDifficultyCalculator(bombDelay), MakeDifficultyCalculatorU256(bombDelay)},
|
||||||
} {
|
} {
|
||||||
time := header.Time + timeDelta
|
time := header.Time + timeDelta
|
||||||
|
@ -130,8 +130,8 @@ func (f *fuzzer) fuzz() int {
|
|||||||
bigFn calculator
|
bigFn calculator
|
||||||
u256Fn calculator
|
u256Fn calculator
|
||||||
}{
|
}{
|
||||||
{ethash.FrontierDifficultyCalulator, ethash.CalcDifficultyFrontierU256},
|
{ethash.FrontierDifficultyCalculator, ethash.CalcDifficultyFrontierU256},
|
||||||
{ethash.HomesteadDifficultyCalulator, ethash.CalcDifficultyHomesteadU256},
|
{ethash.HomesteadDifficultyCalculator, ethash.CalcDifficultyHomesteadU256},
|
||||||
{ethash.DynamicDifficultyCalculator(bombDelay), ethash.MakeDifficultyCalculatorU256(bombDelay)},
|
{ethash.DynamicDifficultyCalculator(bombDelay), ethash.MakeDifficultyCalculatorU256(bombDelay)},
|
||||||
} {
|
} {
|
||||||
want := pair.bigFn(time, header)
|
want := pair.bigFn(time, header)
|
||||||
|
Loading…
Reference in New Issue
Block a user