From c1682e22030dd82a769c3fbe8704337cbff3baa4 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Tue, 4 Jun 2013 15:58:51 +0200 Subject: [PATCH] Ignore rejected shares in top list calculations Fixes #104 --- public/include/classes/statistics.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/include/classes/statistics.class.php b/public/include/classes/statistics.class.php index f9fd18c9..c261a884 100644 --- a/public/include/classes/statistics.class.php +++ b/public/include/classes/statistics.class.php @@ -263,6 +263,7 @@ class Statistics { COUNT(id) AS shares, SUBSTRING_INDEX( username, '.', 1 ) AS account FROM " . $this->share->getTableName() . " + WHERE our_result = 'Y' GROUP BY account ORDER BY shares DESC LIMIT ?"); @@ -279,6 +280,7 @@ class Statistics { SUBSTRING_INDEX( username, '.', 1 ) AS account FROM " . $this->share->getTableName() . " WHERE time > DATE_SUB(now(), INTERVAL 10 MINUTE) + AND our_result = 'Y' GROUP BY account ORDER BY hashrate DESC LIMIT ?"); if ($this->checkStmt($stmt) && $stmt->bind_param("i", $limit) && $stmt->execute() && $result = $stmt->get_result())