MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetBlockSubsidy

Function GetBlockSubsidy

src/validation.cpp:1196–1207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1194}
1195
1196CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
1197{
1198 int halvings = nHeight / consensusParams.nSubsidyHalvingInterval;
1199 // Force block reward to zero when right shift is undefined.
1200 if (halvings >= 64)
1201 return 0;
1202
1203 CAmount nSubsidy = 50 * COIN;
1204 // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
1205 nSubsidy >>= halvings;
1206 return nSubsidy;
1207}
1208
1209bool IsInitialBlockDownload()
1210{

Callers 6

CreateNewBlockMethod · 0.85
ConnectBlockMethod · 0.85
TestBlockSubsidyHalvingsFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
getblocksubsidyFunction · 0.85
getblockstatsFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestBlockSubsidyHalvingsFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68