| 1485 | } |
| 1486 | |
| 1487 | Amount GetBlockSubsidy(int nHeight, const Consensus::Params &consensusParams) { |
| 1488 | int halvings = nHeight / consensusParams.nSubsidyHalvingInterval; |
| 1489 | // Force block reward to zero when right shift is undefined. |
| 1490 | if (halvings >= 64) { |
| 1491 | return Amount::zero(); |
| 1492 | } |
| 1493 | |
| 1494 | Amount nSubsidy = 50 * COIN; |
| 1495 | // Subsidy is cut in half every 210,000 blocks which will occur |
| 1496 | // approximately every 4 years. |
| 1497 | return ((nSubsidy / SATOSHI) >> halvings) * SATOSHI; |
| 1498 | } |
| 1499 | |
| 1500 | CoinsViews::CoinsViews(DBParams db_params, CoinsViewOptions options) |
| 1501 | : m_dbview{std::move(db_params), std::move(options)}, |
no outgoing calls