mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
engine_v2: check minimum timestamp for the first v2 block, close XFN-16 (#1614)
This commit is contained in:
parent
bcbf9dafda
commit
785d51ef5a
1 changed files with 1 additions and 1 deletions
|
|
@ -69,7 +69,7 @@ func (x *XDPoS_v2) verifyHeader(chain consensus.ChainReader, header *types.Heade
|
|||
}
|
||||
|
||||
minePeriod := uint64(x.config.V2.Config(uint64(round)).MinePeriod)
|
||||
if parent.Number.Uint64() > x.config.V2.SwitchBlock.Uint64() && parent.Time.Uint64()+minePeriod > header.Time.Uint64() {
|
||||
if parent.Number.Uint64() >= x.config.V2.SwitchBlock.Uint64() && parent.Time.Uint64()+minePeriod > header.Time.Uint64() {
|
||||
log.Warn("[verifyHeader] Fail to verify header due to invalid timestamp", "ParentTime", parent.Time.Uint64(), "MinePeriod", minePeriod, "HeaderTime", header.Time.Uint64(), "Hash", header.Hash().Hex())
|
||||
return utils.ErrInvalidTimestamp
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue