[FIX] Admin Panel worker hashrates on SHA coins
This commit is contained in:
parent
33958919c6
commit
86e22fcfc7
@ -155,14 +155,14 @@ class Worker extends Base {
|
|||||||
IFNULL(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty), 0) AS difficulty,
|
IFNULL(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty), 0) AS difficulty,
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
IFNULL(IF(our_result='Y', ROUND(SUM(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty)) * 65536 / ? / 1000), 0), 0) AS hashrate
|
IFNULL(IF(our_result='Y', ROUND(SUM(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty)) * POW(2, " . $this->config['target_bits'] . ") / ? / 1000), 0), 0) AS hashrate
|
||||||
FROM " . $this->share->getTableName() . "
|
FROM " . $this->share->getTableName() . "
|
||||||
WHERE
|
WHERE
|
||||||
username = w.username
|
username = w.username
|
||||||
AND time > DATE_SUB(now(), INTERVAL ? SECOND)
|
AND time > DATE_SUB(now(), INTERVAL ? SECOND)
|
||||||
) + (
|
) + (
|
||||||
SELECT
|
SELECT
|
||||||
IFNULL(IF(our_result='Y', ROUND(SUM(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty)) * 65536 / ? / 1000), 0), 0) AS hashrate
|
IFNULL(IF(our_result='Y', ROUND(SUM(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty)) * POW(2, " . $this->config['target_bits'] . ") / ? / 1000), 0), 0) AS hashrate
|
||||||
FROM " . $this->share->getArchiveTableName() . "
|
FROM " . $this->share->getArchiveTableName() . "
|
||||||
WHERE
|
WHERE
|
||||||
username = w.username
|
username = w.username
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user