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);
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue