From 884a2028427bd80d88a8661682eea132767748b8 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Wed, 15 May 2013 13:26:53 +0200 Subject: [PATCH] replaced fixed targetdiff with setting from configuration in user hash rate calculation --- public/include/classes/statistics.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/include/classes/statistics.class.php b/public/include/classes/statistics.class.php index aa08f014..0161c139 100644 --- a/public/include/classes/statistics.class.php +++ b/public/include/classes/statistics.class.php @@ -114,7 +114,7 @@ class Statistics { public function getUserHashrate($account_id) { $stmt = $this->mysqli->prepare(" - SELECT ROUND(COUNT(s.id) * POW(2,21)/600/1000) AS hashrate + SELECT ROUND(COUNT(s.id) * POW(2, " . $this->config['difficulty'] . ")/600/1000) AS hashrate FROM " . $this->share->getTableName() . " AS s, " . $this->user->getTableName() . " AS u WHERE u.username = SUBSTRING_INDEX( s.username, '.', 1 )