Merge pull request #1075 from Fredyy90/patch-7
[FIX] fixed division by Zero for Coins without valid Network Hashrate
This commit is contained in:
commit
4b181201e4
@ -815,6 +815,9 @@ class Statistics extends Base {
|
|||||||
$dNetworkHashrate = 1;
|
$dNetworkHashrate = 1;
|
||||||
$dDifficulty = 1;
|
$dDifficulty = 1;
|
||||||
}
|
}
|
||||||
|
if($dNetworkHashrate <= 0){
|
||||||
|
return $this->memcache->setCache(__FUNCTION__, $this->config['cointarget']);
|
||||||
|
}
|
||||||
|
|
||||||
return $this->memcache->setCache(__FUNCTION__, pow(2, 32) * $dDifficulty / $dNetworkHashrate);
|
return $this->memcache->setCache(__FUNCTION__, pow(2, 32) * $dDifficulty / $dNetworkHashrate);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user