Merge pull request #1046 from Fredyy90/patch-2

[FIX] enable Caching for  ExpectedNextDifficulty and NetworkExpectedTimePerBlock
This commit is contained in:
Sebastian Grewe 2013-12-19 22:46:28 -08:00
commit c63abf66a4

View File

@ -816,7 +816,7 @@ class Statistics extends Base {
$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;
}
return round($dDifficulty * $this->config['cointarget'] / $this->getNetworkExpectedTimePerBlock(), 8);
return $this->memcache->setCache(__FUNCTION__, round($dDifficulty * $this->config['cointarget'] / $this->getNetworkExpectedTimePerBlock(), 8));
}
/**