Merge pull request #519 from TheSerapher/issue-511
Display network hashrate in public API
This commit is contained in:
commit
dcc0596c8f
@ -10,6 +10,9 @@ $api->isActive();
|
||||
$aLastBlock = $block->getLast();
|
||||
$aShares = $statistics->getRoundShares();
|
||||
|
||||
// RPC Calls
|
||||
$bitcoin->can_connect() === true ? $dNetworkHashrate = $bitcoin->query('getnetworkhashps') : $dNetworkHashrate = 0;
|
||||
|
||||
echo json_encode(
|
||||
array(
|
||||
'pool_name' => $config['website']['name'],
|
||||
@ -17,7 +20,7 @@ echo json_encode(
|
||||
'workers' => $worker->getCountAllActiveWorkers(),
|
||||
'shares_this_round' => $aShares['valid'],
|
||||
'last_block' => $aLastBlock['height'],
|
||||
'network_hashrate' => '0'
|
||||
'network_hashrate' => $dNetworkHashrate
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user