From bd28e43479a6bc714fac44a114a2eb4642e58570 Mon Sep 17 00:00:00 2001 From: RekCuy63 Date: Fri, 22 May 2026 09:30:07 +0800 Subject: [PATCH] graphql: handle missing block body in Raw resolver --- graphql/graphql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphql/graphql.go b/graphql/graphql.go index dadc91fac0..b25683cb0f 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)