Fixing round estimates on public stats page
* Fix: Display round restimates when making pool stats public via ACL * Fix: Display proper pool efficiency when pool stats are public Fixes #585
This commit is contained in:
parent
581888fe1f
commit
22e7904da7
@ -12,14 +12,13 @@ $dDifficulty = 1;
|
||||
$aRoundShares = 1;
|
||||
|
||||
// Only run these if the user is logged in
|
||||
if (@$_SESSION['AUTHENTICATED']) {
|
||||
$aRoundShares = $statistics->getRoundShares();
|
||||
if ($bitcoin->can_connect() === true) {
|
||||
$dDifficulty = $bitcoin->query('getdifficulty');
|
||||
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
|
||||
$dDifficulty = $dDifficulty['proof-of-work'];
|
||||
}
|
||||
$aRoundShares = $statistics->getRoundShares();
|
||||
if ($bitcoin->can_connect() === true) {
|
||||
$dDifficulty = $bitcoin->query('getdifficulty');
|
||||
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
|
||||
$dDifficulty = $dDifficulty['proof-of-work'];
|
||||
}
|
||||
|
||||
// Always fetch this since we need for ministats header
|
||||
$bitcoin->can_connect() === true ? $dNetworkHashrate = $bitcoin->query('getnetworkhashps') : $dNetworkHashrate = 0;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user