It seems the fork did not work as expected. Miners only earn TX fees now. Check
https://water.suprnova.cc/index.php?page=statistics&action=blocks or the explorer at
http://cleanwatercoin.altstrade.cc/chain/CleanWaterCoinOut of main.cpp, the following is the relevant code:
static const int64 nMinSubsidy = 1 * COIN;
static const int CUTOFF_HEIGHT = 1000000000; // Temp max height. May need to be forked based on varied reward system
// miner's coin base reward based on nBits
int64 GetProofOfWorkReward(int nHeight, int64 nFees, uint256 prevHash)
{
int64 nSubsidy = 150 * COIN;
double coinDifficulty = (double)GetDifficulty();
int64 rewardCalc = 1/(sqrt(coinDifficulty + 500)); if (nHeight == 1)
{
nSubsidy = 10000000 * COIN; // first block is premine
}
else if (nHeight >1 && nHeight <= 55) // 55 blocks for confirmation of premine
{
nSubsidy = 1 * COIN;
}
else if (nHeight >55 && nHeight <= 7000)
{
nSubsidy = 1000 * COIN;
}
else if (nHeight >7000 && nHeight < 8000)
{
nSubsidy = (int64)((double)(20000 * sqrt(coinDifficulty + 500)) * COIN);
}
// fork here for proper block reward - 8000 per cleanwatercoin guys
else if (nHeight >= 8000 && nHeight <= 250000)
{
nSubsidy = (int64)((double)(20000 * rewardCalc) * COIN);
}
else if (nHeight > 250000 && nHeight <= 500000)
{
nSubsidy = (int64)((double)(15000 * rewardCalc) * COIN);
}
else if (nHeight >500000)
{
nSubsidy = (int64)((double)(10000 * rewardCalc) * COIN);
}
else if (nHeight > CUTOFF_HEIGHT)
{
nSubsidy = 0;
}
return nSubsidy + nFees;
}
Note that rewardCalc is int64 type. Given that its calculation will always be less than 1/sqrt(500) < 0.05 it will be always rounded down to 0. So once it is used in a formula like nSubsidy = (int64)((double)(20000 * rewardCalc) * COIN) it will default to 0, and the nSubsidy would be 0 as well. You are practically now mining for TX fees from here till eternity. The fix? Change rewardCalc declaration to double (in the line bolded above).
Because it is obvious that THIS AGAIN HAS NOT BEEN TESTED, here is some help for that. Copy this code into a main(), envelope it with a for loop going from 1 to 500002 and then another loop from CUTOFF_HEIGHT - 2 to CUTOFF_HEIGHT + 2 and run it standalone while writing the block height and subsidy into a file. Shouldn't take you long to review the file and see if the code is working correctly.
Now where is that fork picture from earlier?