From 7099b2cc042d895bf2402f3cdcf841a11dd47c42 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Fri, 5 Jul 2013 22:02:16 +0200 Subject: [PATCH] Use poolhash rate if nethash is smaller This should avoid some confusion for coins where the network hashrate drops under the pool hashrate due to slow block finding rates. Fixes #378 --- public/include/smarty_globals.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/include/smarty_globals.inc.php b/public/include/smarty_globals.inc.php index dd72974a..e7bfd4b5 100644 --- a/public/include/smarty_globals.inc.php +++ b/public/include/smarty_globals.inc.php @@ -28,6 +28,9 @@ $iCurrentActiveWorkers = $worker->getCountAllActiveWorkers(); $iCurrentPoolHashrate = $statistics->getCurrentHashrate(); $iCurrentPoolShareRate = $statistics->getCurrentShareRate(); +// Avoid confusion, ensure our nethash isn't higher than poolhash +if ($iCurrentPoolHashrate > $dNetworkHashrate) $dNetworkHashrate = $iCurrentPoolHashrate; + // Global data for Smarty $aGlobal = array( 'slogan' => $config['website']['slogan'],