mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
consensus/misc/eip4844: add parent header sanity check
This commit is contained in:
parent
c4ad459bd2
commit
e845e183af
1 changed files with 3 additions and 0 deletions
|
|
@ -34,6 +34,9 @@ var (
|
|||
// if the current block contains no transactions, the excessBlobGas is updated
|
||||
// accordingly.
|
||||
func VerifyEIP4844Header(config *params.ChainConfig, parent, header *types.Header) error {
|
||||
if header.Number.Uint64() != parent.Number.Uint64()+1 {
|
||||
panic("bad header pair")
|
||||
}
|
||||
// Verify the header is not malformed
|
||||
if header.ExcessBlobGas == nil {
|
||||
return errors.New("header is missing excessBlobGas")
|
||||
|
|
|
|||
Loading…
Reference in a new issue