| 1843 | } |
| 1844 | |
| 1845 | CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams) |
| 1846 | { |
| 1847 | int halvings = nHeight / consensusParams.nSubsidyHalvingInterval; |
| 1848 | // Force block reward to zero when right shift is undefined. |
| 1849 | if (halvings >= 64) |
| 1850 | return 0; |
| 1851 | |
| 1852 | CAmount nSubsidy = 50 * COIN; |
| 1853 | // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years. |
| 1854 | nSubsidy >>= halvings; |
| 1855 | return nSubsidy; |
| 1856 | } |
| 1857 | |
| 1858 | CoinsViews::CoinsViews(DBParams db_params, CoinsViewOptions options) |
| 1859 | : m_dbview{std::move(db_params), std::move(options)}, |
no outgoing calls