Bitcoin Halving, what, why and what happened last time.

CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
    int halvings = nHeight / consensusParams.nSubsidyHalvingInterval;
    // Force block reward to zero when right shift is undefined.
    if (halvings >= 64)
        return 0;

    CAmount nSubsidy = 50 * COIN;
    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    nSubsidy >>= halvings;
    return nSubsidy;

Simple right?

In just a few days we will have the second bitcoin halving event. Often in bitcoin we forget that not everyone is elbow deep in code all day, not everyone has been 'with us' for years and while we may talk about things like 'The Halving' we probably don't do the best job at explaining exactly what it is, why it is, what happened last time and what might happen this time.

more ...