From c49faf7f603f415b4fc5a459276e3b7c33edc0cc Mon Sep 17 00:00:00 2001 From: Newt6611 Date: Sun, 1 Mar 2026 22:19:57 +0800 Subject: [PATCH] graphql: handle nil block in Raw method --- graphql/graphql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphql/graphql.go b/graphql/graphql.go index f25bfd127a..bda204437d 100644 --- a/graphql/graphql.go +++ b/graphql/graphql.go @@ -929,7 +929,7 @@ func (b *Block) RawHeader(ctx context.Context) (hexutil.Bytes, error) { func (b *Block) Raw(ctx context.Context) (hexutil.Bytes, error) { block, err := b.resolve(ctx) - if err != nil { + if err != nil || block == nil { return hexutil.Bytes{}, err } return rlp.EncodeToBytes(block)