{
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;
}
I'm guessing that nHeight is the current block number, and then nFees is all the transaction fees that are associated with the block. So then we have
as the definition of the reward for any given block. "COIN" must be the elusive definition of the Bitcoin that I've been trying to find. Then,
this is bit-shifting the block reward by integer values of the current block divided by the halving block number. So this bit shift value was initially zero until we reached block #210,000 at which point nHeight/210000 = 1. So really what we have for nSubsidy is a 64-bit integer with an initial value of:
00000000 00000000 00000000 00000001 00101010 00000101 11110010 00000000 (dec: 5,000,000,000 = 50 BTC)
and which is then shifted an extra bit every time the block count reaches another multiple of 210,0000. Then the block reward added to the transaction fees are returned by the function.
Thanks, Foxpup, this has cleared a lot of things up for me.
EDIT: I just did a case-sensitive word search through about 90% of the Bitcoin source code in order to find this:
Exactly what I was expecting, but good to see it and know that it is in "util.h". I've learned things today. And, oh look, my four hours in the Newbie pool are up. No one can say I wasted them.