Skip to content

Commit

Permalink
[Consensus] Adjust budget rewards to new value
Browse files Browse the repository at this point in the history
  • Loading branch information
tohsnoom committed Jul 6, 2022
1 parent 099d3b7 commit fe1c0ad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/budget/budgetmanager.cpp
Expand Up @@ -852,8 +852,13 @@ std::string CBudgetManager::GetRequiredPaymentsString(int nBlockHeight)

CAmount CBudgetManager::GetTotalBudget(int nHeight)
{
// 20% of the block value
CAmount nSubsidy = GetBlockValue(nHeight) / 5;
// 100% of block reward after V5.5 upgrade
CAmount nSubsidy = GetBlockValue(nHeight);

// 20% of block reward prior to V5.5 upgrade
if (nHeight < Params().GetConsensus().vUpgrades[Consensus::UPGRADE_V5_5].nActivationHeight) {
nSubsidy /= 5;
}

// multiplied by the number of blocks in a cycle (144 on testnet, 30*1440 on mainnet)
return nSubsidy * Params().GetConsensus().nBudgetCycleBlocks;
Expand Down

0 comments on commit fe1c0ad

Please sign in to comment.