mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-02-04 11:14:16 +00:00
Fixed kevacoin difficulty calculation.
This commit is contained in:
parent
86d85c886d
commit
d814fc3128
@ -64,14 +64,14 @@ double GetDifficulty(const CChain& chain, const CBlockIndex* blockindex)
|
||||
|
||||
int nShift = (blockindex->nBits >> 24) & 0xff;
|
||||
double dDiff =
|
||||
(double)0x0000ffff / (double)(blockindex->nBits & 0x00ffffff);
|
||||
(double)0x0ffff0 / (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…
x
Reference in New Issue
Block a user