mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
DV is enabled from epoch 2nd
This commit is contained in:
parent
d11350503b
commit
2bda1ebffd
1 changed files with 15 additions and 12 deletions
|
|
@ -643,6 +643,8 @@ func (c *Posv) verifySeal(chain consensus.ChainReader, header *types.Header, par
|
|||
}
|
||||
|
||||
// header must contain validator info following double validation design
|
||||
// start checking from epoch 2nd.
|
||||
if header.Number.Uint64() > c.config.Epoch {
|
||||
validator, err := c.RecoverValidator(header)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -657,6 +659,7 @@ func (c *Posv) verifySeal(chain consensus.ChainReader, header *types.Header, par
|
|||
log.Debug("Bad block detected. Header contains wrong pair of creator-validator", "creator", creator, "assigned validator", assignedValidator, "wrong validator", validator)
|
||||
return errFailedDoubleValidation
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue