From c6e6c4dee6f7800082e80ad55835db2e8199fe5c Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Thu, 4 Jul 2013 13:25:41 +0200 Subject: [PATCH] Changed error catching in pools page --- public/include/pages/statistics/pool.inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/include/pages/statistics/pool.inc.php b/public/include/pages/statistics/pool.inc.php index 323066f2..1cab1009 100644 --- a/public/include/pages/statistics/pool.inc.php +++ b/public/include/pages/statistics/pool.inc.php @@ -29,10 +29,9 @@ count($aBlocksFoundData) > 0 ? $aBlockData = $aBlocksFoundData[0] : $aBlockData // Estimated time to find the next block $iCurrentPoolHashrate = $statistics->getCurrentHashrate(); -$iCurrentPoolHashrate == 0 ? $iCurrentPoolHashrate = 1 : true; // Time in seconds, not hours, using modifier in smarty to translate -$iEstTime = $dDifficulty * pow(2,32) / ($iCurrentPoolHashrate * 1000); +$iCurrentPoolHashrate > 0 ? $iEstTime = $dDifficulty * pow(2,32) / ($iCurrentPoolHashrate * 1000) : $iEstTime = 0; // Time since last block $now = new DateTime( "now" );