Update main.cpp

This commit is contained in:
cygnusxi 2018-10-17 17:57:37 -05:00 committed by GitHub
parent 06d77fb181
commit baf4535d5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1038,7 +1038,7 @@ int64 GetProofOfStakeReward(int64 nCoinAge, unsigned int nBits, unsigned int nTi
// Stage 2 of emission process is PoS-based. It will be active on mainNet since 20 Jun 2013. // Stage 2 of emission process is PoS-based. It will be active on mainNet since 20 Jun 2013.
CBigNum bnRewardCoinYearLimit = MAX_MINT_PROOF_OF_STAKE; // Base stake mint rate, 100% year interest CBigNum bnRewardCoinYearLimit = MAX_MINT_PROOF_OF_STAKE; // Base stake mint rate, 100% year interest
if (nBestHeight > (int)HF_BLOCK) bnRewardCoinYearLimit = (int)0.04 * MAX_MINT_PROOF_OF_WORK; // 4% hardfork if (nBestHeight > (int)HF_BLOCK) bnRewardCoinYearLimit = (int64)(0.04 * MAX_MINT_PROOF_OF_WORK); // 4% hardfork
CBigNum bnTarget; CBigNum bnTarget;
bnTarget.SetCompact(nBits); bnTarget.SetCompact(nBits);
CBigNum bnTargetLimit = bnProofOfStakeLimit; CBigNum bnTargetLimit = bnProofOfStakeLimit;
@ -1066,7 +1066,7 @@ int64 GetProofOfStakeReward(int64 nCoinAge, unsigned int nBits, unsigned int nTi
bnLowerBound = bnMidValue; bnLowerBound = bnMidValue;
} }
nRewardCoinYear = bnUpperBound.getuint64(); nRewardCoinYear = bnUpperBound.getuint64();
if (nBestHeight > (int)HF_BLOCK) min(nRewardCoinYear, (int)0.04 * MAX_MINT_PROOF_OF_WORK); // 4% hardfork if (nBestHeight > (int)HF_BLOCK) min(nRewardCoinYear, (int64)(0.04 * MAX_MINT_PROOF_OF_WORK)); // 4% hardfork
else nRewardCoinYear = min(nRewardCoinYear, MAX_MINT_PROOF_OF_STAKE); else nRewardCoinYear = min(nRewardCoinYear, MAX_MINT_PROOF_OF_STAKE);