Which fragment of the Satoshi client is verifying if announced block has a valid reward?
I mean, we now live in the 25 BTC reward period. I guess client after receiving a newly minted block, does verifications, like checking if inputs and outputs are balancing for example, and, I guess, if the reward is 25 BTC, right?
So where is this fragment of the code?
I know where is the code which limits BTC supply to 21 million:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
int64 nSubsidy = 50 * COIN;
// Subsidy is cut in half every 210000 blocks, which will occur approximately every 4 years
nSubsidy >>= (nHeight / 210000);
return nSubsidy + nFees;
}
...and I am looking for somebody to point me to the right place, where the verification is done.