diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 43713ad50e7a..4ea9d10d7d91 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -649,7 +649,9 @@ func (s *PublicBlockChainAPI) GetReceiptsByHash(ctx context.Context, blockHash c return nil, err1 } block, err2 := s.b.BlockByHash(ctx, blockHash) - if err2 != nil { + if block == nil { + return nil, nil + } else if err2 != nil { return nil, err2 }