diff --git a/public/include/pages/statistics/pool.inc.php b/public/include/pages/statistics/pool.inc.php index 91dca946..689d771d 100644 --- a/public/include/pages/statistics/pool.inc.php +++ b/public/include/pages/statistics/pool.inc.php @@ -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']); diff --git a/public/include/smarty_globals.inc.php b/public/include/smarty_globals.inc.php index a9424836..8cf2ba9e 100644 --- a/public/include/smarty_globals.inc.php +++ b/public/include/smarty_globals.inc.php @@ -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 diff --git a/public/templates/mpos/statistics/pool/default.tpl b/public/templates/mpos/statistics/pool/default.tpl index 4b3e5453..b47141d9 100644 --- a/public/templates/mpos/statistics/pool/default.tpl +++ b/public/templates/mpos/statistics/pool/default.tpl @@ -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} diff --git a/public/templates/mpos/statistics/pool/general_stats.tpl b/public/templates/mpos/statistics/pool/general_stats.tpl index 0cad6b31..7b34ed84 100644 --- a/public/templates/mpos/statistics/pool/general_stats.tpl +++ b/public/templates/mpos/statistics/pool/general_stats.tpl @@ -5,7 +5,7 @@