Hacker News new | ask | show | jobs
by bitstein 4067 days ago
Seems like a really awful knock-off of:

  CAmount GetBlockValue(int nHeight, const CAmount& nFees)
  {
      CAmount nSubsidy = 50 * COIN;
      int halvings = nHeight / Params().SubsidyHalvingInterval();

      // Force block reward to zero when right shift is undefined.
      if (halvings >= 64)
          return nFees;

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

      return nSubsidy + nFees;
  }
Source: https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#...