Skip to content

Commit e4c011b

Browse files
committed
graphql: add nil checks in Block resolver methods
1 parent e0d81d1 commit e4c011b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

graphql/graphql.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,9 @@ func (b *Block) resolveHeader(ctx context.Context) (*types.Header, error) {
707707
if err != nil {
708708
return nil, err
709709
}
710+
if b.header == nil {
711+
return nil, nil
712+
}
710713
if b.hash == (common.Hash{}) {
711714
b.hash = b.header.Hash()
712715
}

0 commit comments

Comments
 (0)