additional Dogecoin 1.6 protocol change
(cherry picked from commit 650ec89e251e1201479d75f79ac520f278a50c40)
This commit is contained in:
parent
abaa0f686b
commit
e68d56b2db
15
src/main.cpp
15
src/main.cpp
|
@ -1206,10 +1206,17 @@ unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime)
|
||||||
bnResult.SetCompact(nBase);
|
bnResult.SetCompact(nBase);
|
||||||
while (nTime > 0 && bnResult < bnLimit)
|
while (nTime > 0 && bnResult < bnLimit)
|
||||||
{
|
{
|
||||||
// Maximum 400% adjustment...
|
if(chainActive.Height()+1<nDiffChangeTarget){
|
||||||
bnResult *= 4;
|
// Maximum 400% adjustment...
|
||||||
// ... in best-case exactly 4-times-normal target time
|
bnResult *= 4;
|
||||||
nTime -= nTargetTimespan*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)
|
if (bnResult > bnLimit)
|
||||||
bnResult = bnLimit;
|
bnResult = bnLimit;
|
||||||
|
|
Loading…
Reference in a new issue