In what line of what file does the block reward depend on? I want to make an altcoin and since I am new, I wanted to know what sets the reward of a block after being mined.
main.cpp:

int64_t GetBlockValue(int nHeight, int64_t nFees)
{
    int64_t nSubsidy = 50 * COIN;

    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    nSubsidy &gt;&gt;= (nHeight / Params().SubsidyHalvingInterval());

    return nSubsidy + nFees;
}


miner.cpp (within CreateNewBlock):

pblock-&gt;vtx[0].vout[0].nValue = GetBlockValue(pindexPrev-&gt;nHeight+1, nFees);