[FIX] fixed division by Zero for Coins without valid Network Hashrate

This commit is contained in:
Frederick Behrends 2013-12-23 09:58:47 +01:00
parent 12a966c76a
commit a785d251e0

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);
}