int64 static GetBlockValue(int nHeight, int64 nFees, uint256 prevHash)
{
int64 nSubsidy = 0 * COIN;
std::string cseed_str = prevHash.ToString().substr(8,7);
const char* cseed = cseed_str.c_str();
long seed = hex2long(cseed);
int rand = generateMTRandom(seed, 100000);
if(rand > 50000 && rand < 50011)
nSubsidy = 10045 * COIN; //The VGB Protocol Random 250x Block Award
else if(nHeight == 1)
nSubsidy = 1100000 * COIN; //.5% Public Wallet Premine
else if(nHeight == 2)
nSubsidy = 1100000 * COIN; //.5% Coin Owner Premine
else if(nHeight < 249)
nSubsidy = 0 * COIN; //No Coins awarded for the first 250 blocks (fair launch)
else if(nHeight > 250)
nSubsidy = 49 * COIN; //Standard 49 Coin Reward
if(nHeight > 14726880) // no block reward after 7 years
nSubsidy = 0;
return nSubsidy + nFees;
}
I'm no coder and I probably have no idea what I'm doing (is this C?), but there's my proposed fix. I cannot promise if it's at all right, but I'd love 0.2BTC!!
14qkEkmoWQbgF4EMB6F5m8p3LU1D8UK32D
Much obliged.
I believe that still allows superblocks to be created in the first 250 blocks. I'm a noob, but I would do something like this.
int64 static GetBlockValue(int nHeight, int64 nFees, uint256 prevHash)
{
int64 nSubsidy = 0 * COIN;
if(nHeight == 1)
nSubsidy = 1100000 * COIN; //.5% Public Wallet Premine
else if(nHeight == 2)
nSubsidy = 1100000 * COIN; //.5% Coin Owner Premine
else if(nHeight < 250)
nSubsidy = 0 * COIN; //No Coins awarded for the first 250 blocks (fair launch)
else if(nHeight > 250) {
nSubsidy = 49 * COIN; //Standard 49 Coin Reward
std::string cseed_str = prevHash.ToString().substr(8,7);
const char* cseed = cseed_str.c_str();
long seed = hex2long(cseed);
int rand = generateMTRandom(seed, 100000);
if(rand > 50000 && rand < 50011)
nSubsidy = 10045 * COIN; //The VGB Protocol Random 250x Block Award
}
if(nHeight > 14726880) // no block reward after 7 years
nSubsidy = 0;
return nSubsidy + nFees;
}