From d1f45def65c06ca29f75e3cf3840a71a7555bebe Mon Sep 17 00:00:00 2001 From: blxdyx Date: Thu, 25 Jul 2024 17:14:58 +0800 Subject: [PATCH] fix bohr --- consensus/misc/eip4844.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consensus/misc/eip4844.go b/consensus/misc/eip4844.go index 7784a2b1ff2..e7a00620526 100644 --- a/consensus/misc/eip4844.go +++ b/consensus/misc/eip4844.go @@ -90,7 +90,7 @@ func VerifyPresenceOfCancunHeaderFields(header *types.Header) error { return nil } -// VerifyPresenceOfCancunHeaderFields checks that the fields introduced in Cancun (EIP-4844, EIP-4788) are present. +// VerifyPresenceOfBohrHeaderFields checks that the fields introduced in Cancun (EIP-4844, EIP-4788) are present. func VerifyPresenceOfBohrHeaderFields(header *types.Header) error { if header.BlobGasUsed == nil { return fmt.Errorf("header is missing blobGasUsed") @@ -98,7 +98,7 @@ func VerifyPresenceOfBohrHeaderFields(header *types.Header) error { if header.ExcessBlobGas == nil { return fmt.Errorf("header is missing excessBlobGas") } - if header.ParentBeaconBlockRoot != nil || *header.ParentBeaconBlockRoot != (libcommon.Hash{}) { + if header.ParentBeaconBlockRoot == nil || *header.ParentBeaconBlockRoot != (libcommon.Hash{}) { return fmt.Errorf("invalid parentBeaconRoot, have %#x, expected zero hash", header.ParentBeaconBlockRoot) } if header.WithdrawalsHash == nil || *header.WithdrawalsHash != types.EmptyRootHash {