Merge pull request #1075 from Fredyy90/patch-7

[FIX] fixed division by Zero for Coins without valid Network Hashrate
This commit is contained in:
Sebastian Grewe 2013-12-23 01:22:14 -08:00
commit 4b181201e4

View File

@ -815,6 +815,9 @@ class Statistics extends Base {
$dNetworkHashrate = 1;
$dDifficulty = 1;
}
if($dNetworkHashrate <= 0){
return $this->memcache->setCache(__FUNCTION__, $this->config['cointarget']);
}
return $this->memcache->setCache(__FUNCTION__, pow(2, 32) * $dDifficulty / $dNetworkHashrate);
}