Skip to content

Commit

Permalink
Merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MoneroOcean committed Nov 4, 2024
1 parent 5aa20c5 commit a81b3cc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/core/MoBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,12 @@ void MoBenchmark::onJobResult(const JobResult& result) {
for (auto backend : m_controller->miner()->backends()) {
const Hashrate *hr = backend->hashrate();
if (!hr) continue;
t[0] += hr->calc(Hashrate::ShortInterval);
t[1] += hr->calc(Hashrate::MediumInterval);
t[2] += hr->calc(Hashrate::LargeInterval);
auto hr_pair = hr->calc(Hashrate::ShortInterval);
if (hr_pair.first) t[0] += hr_pair.second;
hr_pair = hr->calc(Hashrate::MediumInterval)
if (hr_pair.first) t[1] += hr_pair.second;
hr_pair = hr->calc(Hashrate::LargeInterval)
if (hr_pair.first) t[2] += hr_pair.second;
}
double hashrate = 0.0f;
if (!(hashrate = t[2]))
Expand Down

0 comments on commit a81b3cc

Please sign in to comment.