consensus: remove seal verification from the consensus engine interface (#22274)

This commit is contained in:
Guillaume Ballet
2021-02-05 19:44:34 +01:00
committed by GitHub
parent 7ed860d4f1
commit e74bd587f7
5 changed files with 4 additions and 20 deletions

View File

@ -288,7 +288,7 @@ func (ethash *Ethash) verifyHeader(chain consensus.ChainHeaderReader, header, pa
}
// Verify the engine specific seal securing the block
if seal {
if err := ethash.VerifySeal(chain, header); err != nil {
if err := ethash.verifySeal(chain, header, false); err != nil {
return err
}
}
@ -488,12 +488,6 @@ var FrontierDifficultyCalulator = calcDifficultyFrontier
var HomesteadDifficultyCalulator = calcDifficultyHomestead
var DynamicDifficultyCalculator = makeDifficultyCalculator
// VerifySeal implements consensus.Engine, checking whether the given block satisfies
// the PoW difficulty requirements.
func (ethash *Ethash) VerifySeal(chain consensus.ChainHeaderReader, header *types.Header) error {
return ethash.verifySeal(chain, header, false)
}
// verifySeal checks whether a block satisfies the PoW difficulty requirements,
// either using the usual ethash cache for it, or alternatively using a full DAG
// to make remote mining fast.