Merge pull request #936 from TheSerapher/issue-934
[FIX] Network hashrate in dashboard
This commit is contained in:
commit
eefb3a213a
@ -41,6 +41,14 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||
$dTimeSinceLast = 0;
|
||||
}
|
||||
|
||||
// Round progress
|
||||
$iEstShares = $statistics->getEstimatedShares($dDifficulty);
|
||||
if ($iEstShares > 0 && $aRoundShares['valid'] > 0) {
|
||||
$dEstPercent = round(100 / $iEstShares * $aRoundShares['valid'], 2);
|
||||
} else {
|
||||
$dEstPercent = 0;
|
||||
}
|
||||
|
||||
// Propagate content our template
|
||||
$smarty->assign("ESTTIME", $iEstTime);
|
||||
$smarty->assign("TIMESINCELAST", $dTimeSinceLast);
|
||||
@ -50,6 +58,8 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||
$smarty->assign("CONTRIBHASHES", $aContributorsHashes);
|
||||
$smarty->assign("CURRENTBLOCK", $iBlock);
|
||||
$smarty->assign("CURRENTBLOCKHASH", @$sBlockHash);
|
||||
$smarty->assign('NETWORK', array('difficulty' => $dDifficulty, 'block' => $iBlock));
|
||||
$smarty->assign('ESTIMATES', array('shares' => $iEstShares, 'percent' => $dEstPercent));
|
||||
if (count($aBlockData) > 0) {
|
||||
$smarty->assign("LASTBLOCK", $aBlockData['height']);
|
||||
$smarty->assign("LASTBLOCKHASH", $aBlockData['blockhash']);
|
||||
|
||||
@ -35,7 +35,7 @@ if ( ! $dPersonalHashrateModifier = $setting->getValue('statistics_personal_hash
|
||||
if ( ! $dNetworkHashrateModifier = $setting->getValue('statistics_network_hashrate_modifier') ) $dNetworkHashrateModifier = 1;
|
||||
|
||||
// Apply modifier now
|
||||
$dNetworkHashrate = $dNetworkHashrate * $dNetworkHashrateModifier;
|
||||
$dNetworkHashrate = $dNetworkHashrate / 1000 * $dNetworkHashrateModifier;
|
||||
$iCurrentPoolHashrate = $iCurrentPoolHashrate * $dPoolHashrateModifier;
|
||||
|
||||
// Share rate of the entire pool
|
||||
|
||||
@ -6,4 +6,6 @@
|
||||
|
||||
{include file="statistics/blocks/small_table.tpl" ALIGN="right" SHORT=true}
|
||||
|
||||
{if !$GLOBAL.website.api.disabled}
|
||||
{include file="statistics/js.tpl"}
|
||||
{/if}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<th align="left" width="50%">Pool Hash Rate</th>
|
||||
<td width="70%"><span id="b-hashrate"></span> {$GLOBAL.hashunits.pool}</td>
|
||||
<td width="70%"><span id="b-hashrate">{$GLOBAL.hashrate|number_format:"3"}</span> {$GLOBAL.hashunits.pool}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="left">Pool Efficiency</td>
|
||||
@ -13,14 +13,14 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="left">Current Active Workers</td>
|
||||
<td id="b-workers"></td>
|
||||
<td id="b-workers">{$GLOBAL.workers}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="left">Current Difficulty</td>
|
||||
{if ! $GLOBAL.website.chaininfo.disabled}
|
||||
<td><a href="{$GLOBAL.website.chaininfo.url}" target="_new"><font size="2"><span id="b-diff"></span></font></a></td>
|
||||
<td><a href="{$GLOBAL.website.chaininfo.url}" target="_new"><font size="2"><span id="b-diff">{$NETWORK.difficulty}</span></font></a></td>
|
||||
{else}
|
||||
<td><font size="2"><span id="b-diff"></span></font></td>
|
||||
<td><font size="2"><span id="b-diff">{$NETWORK.difficulty}</span></font></td>
|
||||
{/if}
|
||||
</tr>
|
||||
<tr>
|
||||
@ -29,7 +29,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="left">Est. Shares this Round</td>
|
||||
<td id="b-target"></td>
|
||||
<td id="b-target">{$ESTIMATES.shares} (done: {$ESTIMATES.percent}%)</td>
|
||||
</tr>
|
||||
{if ! $GLOBAL.website.blockexplorer.disabled}
|
||||
<tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user