adding gethashps changes to dashboard
This commit is contained in:
parent
69ed2ab768
commit
727ed1f79a
@ -16,7 +16,21 @@ if ($bitcoin->can_connect() === true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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;
|
$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'];
|
||||||
|
try { $dNetworkHashrate = $bitcoin->query('getnetworkhashps') / 1000; } catch (Exception $e) {
|
||||||
|
// Maybe we are SHA
|
||||||
|
try { $dNetworkHashrate = $bitcoin->query('gethashespersec') / 1000; } catch (Exception $e) {
|
||||||
|
$dNetworkHashrate = 0;
|
||||||
|
}
|
||||||
|
$dNetworkHashrate = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$dNetworkHashrate = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Fetch some data
|
// Fetch some data
|
||||||
if (!$iCurrentActiveWorkers = $worker->getCountAllActiveWorkers()) $iCurrentActiveWorkers = 0;
|
if (!$iCurrentActiveWorkers = $worker->getCountAllActiveWorkers()) $iCurrentActiveWorkers = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user