Merge pull request #326 from TheSerapher/issue-325

Adding network hashrate to ministats header
This commit is contained in:
Sebastian Grewe 2013-07-01 09:41:45 -07:00
commit 35ace98a3c
2 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,7 @@ if (@$_SESSION['AUTHENTICATED']) {
$dDifficulty = $bitcoin->query('getdifficulty');
if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty))
$dDifficulty = $dDifficulty['proof-of-work'];
$dNetworkHashrate = $bitcoin->query('getnetworkhashps');
}
}
@ -31,6 +32,7 @@ $aGlobal = array(
'slogan' => $config['website']['slogan'],
'websitename' => $config['website']['name'],
'hashrate' => $iCurrentPoolHashrate,
'nethashrate' => $dNetworkHashrate,
'sharerate' => $iCurrentPoolShareRate,
'ppsvalue' => number_format(round(50 / (pow(2,32) * $dDifficulty) * pow(2, $config['difficulty']), 12) ,12),
'workers' => $iCurrentActiveWorkers,

View File

@ -5,6 +5,7 @@
<table border="0">
<tr>
{if $GLOBAL.config.price.currency}<td><li>{$GLOBAL.config.currency}/{$GLOBAL.config.price.currency}: {$GLOBAL.price|default:"n/a"|number_format:"4"}&nbsp;&nbsp;&nbsp;&nbsp;</li></td>{/if}
<td><li>Network Hashrate: {($GLOBAL.nethashrate / 1000 / 1000 )|number_format:"3"} GH/s&nbsp;&nbsp;&nbsp;&nbsp;</li></td>
<td><li>Pool Hashrate: {($GLOBAL.hashrate / 1000)|number_format:"3"} MH/s&nbsp;&nbsp;&nbsp;&nbsp;</li></td>
<td><li>Pool Sharerate: {$GLOBAL.sharerate|number_format:"2"} Shares/s&nbsp;&nbsp;&nbsp;&nbsp;</li></td>
<td><li>Pool Workers: {$GLOBAL.workers}&nbsp;&nbsp;&nbsp;&nbsp;</li></td>