Merge pull request #1534 from freynder/next
Bugfix: shares and shares_archive values should be added up.
This commit is contained in:
commit
be19318e26
@ -753,7 +753,7 @@ class Statistics extends Base {
|
|||||||
// Initilize array
|
// Initilize array
|
||||||
for ($i = 0; $i < 24; $i++) $aData[($iStartHour + $i) % 24] = 0;
|
for ($i = 0; $i < 24; $i++) $aData[($iStartHour + $i) % 24] = 0;
|
||||||
// Fill data
|
// Fill data
|
||||||
while ($row = $result->fetch_assoc()) $aData[$row['hour']] = $row['hashrate'];
|
while ($row = $result->fetch_assoc()) $aData[$row['hour']] += $row['hashrate'];
|
||||||
return $this->memcache->setCache(__FUNCTION__ . $account_id, $aData);
|
return $this->memcache->setCache(__FUNCTION__ . $account_id, $aData);
|
||||||
}
|
}
|
||||||
return $this->sqlError();
|
return $this->sqlError();
|
||||||
@ -792,7 +792,7 @@ class Statistics extends Base {
|
|||||||
// Initilize array
|
// Initilize array
|
||||||
for ($i = 0; $i < 24; $i++) $aData[($iStartHour + $i) % 24] = 0;
|
for ($i = 0; $i < 24; $i++) $aData[($iStartHour + $i) % 24] = 0;
|
||||||
// Fill data
|
// Fill data
|
||||||
while ($row = $result->fetch_assoc()) $aData[$row['hour']] = (int) $row['hashrate'];
|
while ($row = $result->fetch_assoc()) $aData[$row['hour']] += (int) $row['hashrate'];
|
||||||
return $this->memcache->setCache(__FUNCTION__, $aData);
|
return $this->memcache->setCache(__FUNCTION__, $aData);
|
||||||
}
|
}
|
||||||
return $this->sqlError();
|
return $this->sqlError();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user