Merge pull request #1046 from Fredyy90/patch-2
[FIX] enable Caching for ExpectedNextDifficulty and NetworkExpectedTimePerBlock
This commit is contained in:
commit
c63abf66a4
@ -816,7 +816,7 @@ class Statistics extends Base {
|
|||||||
$dDifficulty = 1;
|
$dDifficulty = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return pow(2, 32) * $dDifficulty / $dNetworkHashrate;
|
return $this->memcache->setCache(__FUNCTION__, pow(2, 32) * $dDifficulty / $dNetworkHashrate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -832,7 +832,7 @@ class Statistics extends Base {
|
|||||||
$dDifficulty = 1;
|
$dDifficulty = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return round($dDifficulty * $this->config['cointarget'] / $this->getNetworkExpectedTimePerBlock(), 8);
|
return $this->memcache->setCache(__FUNCTION__, round($dDifficulty * $this->config['cointarget'] / $this->getNetworkExpectedTimePerBlock(), 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user