1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-12 01:42:48 -05:00

Restore Hashrate class interface.

This commit is contained in:
XMRig
2020-12-05 11:09:25 +07:00
parent bd82b3c852
commit acf7ec8355
7 changed files with 90 additions and 103 deletions

View File

@@ -93,7 +93,7 @@ bool xmrig::Workers<T>::tick(uint64_t)
IWorker *worker = handle->worker();
if (worker) {
worker->hashrateData(hashCount, ts, rawHashes);
d_ptr->hashrate->add(handle->id() + 1, hashCount, ts);
d_ptr->hashrate->add(handle->id(), hashCount, ts);
if (rawHashes == 0) {
totalAvailable = false;
@@ -104,7 +104,7 @@ bool xmrig::Workers<T>::tick(uint64_t)
}
if (totalAvailable) {
d_ptr->hashrate->add(0, totalHashCount, Chrono::steadyMSecs());
d_ptr->hashrate->add(totalHashCount, Chrono::steadyMSecs());
}
# ifdef XMRIG_FEATURE_BENCHMARK