| 1508 | } |
| 1509 | |
| 1510 | CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams) |
| 1511 | { |
| 1512 | int halvings = nHeight / consensusParams.nSubsidyHalvingInterval; |
| 1513 | // Force block reward to zero when right shift is undefined. |
| 1514 | if (halvings >= 64) |
| 1515 | return 0; |
| 1516 | |
| 1517 | CAmount nSubsidy = consensusParams.genesis_subsidy; |
| 1518 | // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years. |
| 1519 | nSubsidy >>= halvings; |
| 1520 | return nSubsidy; |
| 1521 | } |
| 1522 | |
| 1523 | CoinsViews::CoinsViews( |
| 1524 | std::string ldb_name, |
no outgoing calls