normalize difficulty so that 1 == minmum difficulty
This commit is contained in:
parent
047abede75
commit
f4be61d90a
1 changed files with 2 additions and 2 deletions
|
@ -48,12 +48,12 @@ double GetDifficulty(const CBlockIndex* blockindex)
|
|||
double dDiff =
|
||||
(double)0x0000ffff / (double)(blockindex->nBits & 0x00ffffff);
|
||||
|
||||
while (nShift < 29)
|
||||
while (nShift < 31)
|
||||
{
|
||||
dDiff *= 256.0;
|
||||
nShift++;
|
||||
}
|
||||
while (nShift > 29)
|
||||
while (nShift > 31)
|
||||
{
|
||||
dDiff /= 256.0;
|
||||
nShift--;
|
||||
|
|
Loading…
Reference in a new issue