additional Dogecoin 1.6 protocol change

(cherry picked from commit 650ec89e251e1201479d75f79ac520f278a50c40)
This commit is contained in:
Jannis Froese 2014-03-22 08:44:58 +01:00
parent abaa0f686b
commit e68d56b2db

View file

@ -1206,10 +1206,17 @@ unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime)
bnResult.SetCompact(nBase);
while (nTime > 0 && bnResult < bnLimit)
{
// Maximum 400% adjustment...
bnResult *= 4;
// ... in best-case exactly 4-times-normal target time
nTime -= nTargetTimespan*4;
if(chainActive.Height()+1<nDiffChangeTarget){
// Maximum 400% adjustment...
bnResult *= 4;
// ... in best-case exactly 4-times-normal target time
nTime -= nTargetTimespan*4;
} else {
// Maximum 10% adjustment...
bnResult = (bnResult * 110) / 100;
// ... in best-case exactly 4-times-normal target time
nTime -= nTargetTimespanNEW*4;
}
}
if (bnResult > bnLimit)
bnResult = bnLimit;