Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int64 GetProofOfWorkReward(int nHeight, int64 nFees, uint256 prevHash)
- {
- static const int64 nMinimumCoin = 0.0777 * COIN;
- int64 nSubsidy = 0.0777 * COIN; //genesis
- if (nHeight > 0 && nHeight < 7) {nSubsidy = 0 * COIN;} // zero
- else if (nHeight == 7) {nSubsidy = 177777 * COIN;} // Premine
- else if (nHeight > 7 && nHeight < 1000) {nSubsidy = 2.5 * COIN;} // IRC Launch
- else if (nHeight > 1000 && nHeight < 1337) {nSubsidy = 0.0777 * COIN;} // low instamine official launch
- else if (nHeight == 1337) {nSubsidy = 1337 * COIN;} //L33T
- else if (nHeight > 1337 && nHeight < 4000) {nSubsidy = 1 * COIN;} //final launch period
- else if (nHeight > 4000 && nHeight < 8000) {nSubsidy = 22.5 * COIN;} // 22.5 coin
- else if (nHeight > 8000 && nHeight < 16000) {nSubsidy = 15 * COIN;} // 15 coins per block
- else if (nHeight > 16000 && nHeight < 32000) {nSubsidy = 7.5 * COIN;} // 7.5 coins per block
- else if (nHeight > 32000 && nHeight < 64000) {nSubsidy = 6 * COIN;} // 6 coins per block
- else if (nHeight > 64000 && nHeight < 77777) {nSubsidy = 4 * COIN;} // 4 coins
- else if (nHeight == 77777) {nSubsidy = 10000 * COIN;} // bonus reward
- else if (nHeight > 77777 && nHeight < 128000) {nSubsidy = 4 * COIN;} // 4 coins
- else if (nHeight > 128000 && nHeight < 256000) {nSubsidy = 20 * COIN;} // 20 coins
- else if (nHeight > 256000 && nHeight < 400000) {nSubsidy = 25 * COIN;} // 25 coins
- else if (nHeight > 2400000) {nSubsidy = 5 * COIN;}
- else {nSubsidy = 1 * COIN;}
- // Subsidy is cut in half every 400 thousand blocks
- nSubsidy >>= (nHeight / 400000);
- // Minimum subsidy
- if (nSubsidy < nMinimumCoin)
- {
- nSubsidy = nMinimumCoin;
- }
- return nSubsidy + nFees;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement