Ahh, ok. In that case, you need to look at the header. The exact integer amount of work that a block is "worth" is encoded in the bits field. The
wiki page describes the format, and someone already posted a link into the actual source where the calculation is done.
If you are looking for the math that updates the expected next target once a 2016 block window has been completed, let me know. I think it is in main.cpp, and I can find it, it is just annoying to do from this computer. It basically calculates what the difficulty in the previous window
should have been to get an average of 10 minutes per block.
Edit: Oh, blocks that have the wrong difficulty in the header are rejected as invalid, so there won't be any subtle disagreements,