mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-17 00:07:47 +00:00
Fixed average effort calculation
This commit is contained in:
parent
662a7e91c8
commit
7364292ece
1 changed files with 2 additions and 2 deletions
|
@ -382,8 +382,8 @@ void StratumServer::print_stratum_status() const
|
|||
const uint64_t hashrate_24h = (dt_24h > 0) ? (hashes_24h / dt_24h) : 0;
|
||||
|
||||
double average_effort = 0.0;
|
||||
if (m_cumulativeHashesAtLastShare > 0) {
|
||||
average_effort = m_cumulativeFoundSharesDiff * 100.0 / static_cast<double>(m_cumulativeHashesAtLastShare);
|
||||
if (m_cumulativeFoundSharesDiff > 0.0) {
|
||||
average_effort = static_cast<double>(m_cumulativeHashesAtLastShare) * 100.0 / m_cumulativeFoundSharesDiff;
|
||||
}
|
||||
|
||||
LOGINFO(0, "status" <<
|
||||
|
|
Loading…
Reference in a new issue