mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 18:00:46 +00:00
consensus: skip gas limit verification for genesis block (#1646)
This commit is contained in:
parent
22edaacf0d
commit
25a70e8770
1 changed files with 2 additions and 1 deletions
|
|
@ -64,7 +64,8 @@ func (x *XDPoS_v2) verifyHeader(chain consensus.ChainReader, header *types.Heade
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure gas limit is consistent with parent
|
// Ensure gas limit is consistent with parent
|
||||||
if err := misc.VerifyGaslimit(parent.GasLimit, header.GasLimit); err != nil {
|
err := misc.VerifyGaslimit(parent.GasLimit, header.GasLimit)
|
||||||
|
if err != nil && parent.Number.Uint64() != 0 { // skip genesis block
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Ensure gas used is less than or equal to gas limit
|
// Ensure gas used is less than or equal to gas limit
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue