ok, keep in mind i´m not a C dev, but this looks weird to me.
(
perhaps i just don´t understand the calculations going on)
unsigned int static GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlock *pblock)
{
int DiffMode = 1;
if (fTestNet) {
if (pindexLast->nHeight+1 >= 50) { DiffMode = 2; }
}
else {
if (pindexLast->nHeight+1 >=
25000) {
DiffMode = 2; }
}
if (DiffMode == 1) { return GetNextWorkRequired_V1(pindexLast, pblock); }
else
if (DiffMode == 2) { return
GetNextWorkRequired_V2(pindexLast, pblock); }
return GetNextWorkRequired_V2(pindexLast, pblock);
}
GetNextWorkRequired_V1 is the old diff routine,
GetNextWorkRequired_V2 is the
KGW diff routine and is called when DiffMode becomes 2.
DiffMode becomes 2 when
something (current block?) gets above
25000.
Am i cross eyed?
Can SunCoin DEV check this out?
SUN: SeTwgd1vtkV8suztgc6h8PsUtpMCJHe35J