My only complaint is that the payouts started at block 3000 rather than the announced 4200.
That said, this is a "solve by inspection" problem for anyone with a brain so I'll forgive Hazard. The source code was out there (on megafileshare or whatever... LOL... Github, anyone?) for everyone to view
That's the only reason I got 4k wec in 20 min and quit mining :-)
New thing for me to learn today
How do you find out how something works like this? How the block pays out and stuff and how the retarget works?
Check post #145 (page 8 ) for the relevant snippet of code on payout.
yes I know that is there... but what I want to know is when a new coin comes out say and they dont provide this info... where is it written? Its in the code somewhere. Your one of the few that actually provided the info in the thread.
Actually I didn't (but thanks), fenican did. But for future reference, it's in the main.cpp file if you haven't been able to find it yet. I'm no programmer, honest,but I can usually follow the logic in someone else's code.
In this case, the BlockValue code starts at line 829.
int64 static GetBlockValue(int nHeight, int64 nFees)
{
int64 nSubsidy = 420 * COIN;
if(nHeight == 2)
{
nSubsidy = 420000 * COIN;
}
else if(nHeight < 3000)
{
nSubsidy = 1 * COIN;
}
return nSubsidy + nFees;
}
The first thing in there is the "default" BlockValue (420).
Next is a "special" BlockValue when the Height is exactly 2 (420000). Nice way to give a decent amount to the creator for bounty without pre-mining the thing to death.
finally is the "fair start" BlockValue (1) where the value is lower until 3000.
I'm not trying to talk down to you but explaining it for anyone who comes along later and isn't able to read it right away.
Also, kudos to Hazard for commenting his code! Not everything is commented but a lot of it is.
Starting at line 845 is the code for Target adjustments.
static const int64 nTargetTimespan = 420 * 60 * 252; // WeedCoin: 420 block
static const int64 nTargetSpacing = 252 * 60; // WeedCoin: 4 min 20 sec
static const int64 nInterval = nTargetTimespan / nTargetSpacing;
The above sets the interval but I admit I'm not 100% sure why the need to include the first constant...
I believe that the maximum adjustment is also 400% (and not only on Testnet) but again, not positive.