Skip to content

Commit

Permalink
Fix spotter blocks to from 0.01% to 1% at block 2500
Browse files Browse the repository at this point in the history
  • Loading branch information
diatonic committed Jul 24, 2013
1 parent 72e57eb commit 64bd5c2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ int64 static GetBlockValue(int nHeight, int64 nFees, uint256 prevHash)
{
int64 nSubsidy = 49 * COIN;

if(nHeight > 1)
if(nHeight > 1 && nHeight < 2500) // Fix spotter blocks to from 0.01% to 1% at block 2500
{
std::string cseed_str = prevHash.ToString().substr(8,7);
const char* cseed = cseed_str.c_str();
Expand All @@ -854,6 +854,17 @@ int64 static GetBlockValue(int nHeight, int64 nFees, uint256 prevHash)
if(rand > 50000 && rand < 50011)
nSubsidy = 10045 * COIN;
}
else if(nHeight >= 2500)
{
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 > 70000 && rand < 71001)
nSubsidy = 10045 * COIN;
}

return nSubsidy + nFees;
}
Expand Down

0 comments on commit 64bd5c2

Please sign in to comment.