I'm in the process of learning Open GL and am having issues with lighting on my Terrian, I don't know if the issue is related to how I calculate my normals or the shader itself (I am using the shader from the Open GL wikibook - Lighting Arc tutorial 1). I calculate the normals like this:

This code generates point normals by "averaging" the triangle normals of the adjacent triangles. I assumed this is what you wanted anyways. Note that this is an arbitrary method to generate point normals. Strictly speaking, points to not have normals. But for lighting, it is usually fine to generate them like this - it "fakes" a smoother surface. I normally leave out the normalization of the triangle normals - it biases the final normals to the directions with greater surface (on a terrain, these would be the slopes). Just experiment with it a little.

Alternatively, you can also derive the normals by constructing partial derivatives of your heightmap. This is a lot faster, but needs special treatment on the broders.

I assume you are using glDrawElements, and not the (deprecated) glVertex* functions. Then you have to decide, if

you want to have 1 normal per vertex, which means you have to average the normals of all faces adjacent to the vertex, or

you want to have 3 normals per triangle, which means you have to duplicate the vertices and store 3 normals for each face.

Currently your code looks like a mixture of both. You're adding 3 normals per terrain triangle, but your terrian_normals.reserve() call only allocates one normal for each vertex. I suspect your terrian_vertices and terrian_normals arrays have different size, and you're not properly aligning vertices with their normals during rendering.