Merge pull request #593 from TheSerapher/issue-585
Fixing round estimates on public stats page
This commit is contained in:
commit
0b701d7d06
@ -12,14 +12,13 @@ $dDifficulty = 1;
|
|||||||
$aRoundShares = 1;
|
$aRoundShares = 1;
|
||||||
|
|
||||||
// Only run these if the user is logged in
|
// Only run these if the user is logged in
|
||||||
if (@$_SESSION['AUTHENTICATED']) {
|
$aRoundShares = $statistics->getRoundShares();
|
||||||
$aRoundShares = $statistics->getRoundShares();
|
if ($bitcoin->can_connect() === true) {
|
||||||
if ($bitcoin->can_connect() === true) {
|
$dDifficulty = $bitcoin->query('getdifficulty');
|
||||||
$dDifficulty = $bitcoin->query('getdifficulty');
|
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
|
||||||
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
|
$dDifficulty = $dDifficulty['proof-of-work'];
|
||||||
$dDifficulty = $dDifficulty['proof-of-work'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always fetch this since we need for ministats header
|
// Always fetch this since we need for ministats header
|
||||||
$bitcoin->can_connect() === true ? $dNetworkHashrate = $bitcoin->query('getnetworkhashps') : $dNetworkHashrate = 0;
|
$bitcoin->can_connect() === true ? $dNetworkHashrate = $bitcoin->query('getnetworkhashps') : $dNetworkHashrate = 0;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user