Removed m_bench field from Job class.

This commit is contained in:
XMRig 2020-10-16 20:29:11 +07:00
parent 36b1523194
commit 7fc7b976bf
No known key found for this signature in database
GPG key ID: 446A53638BE94409
19 changed files with 44 additions and 68 deletions

View file

@ -128,6 +128,8 @@ void xmrig::Network::onActive(IStrategy *strategy, IClient *client)
# ifdef XMRIG_FEATURE_BENCHMARK
if (pool.mode() == Pool::MODE_BENCHMARK) {
m_benchSize = pool.benchSize();
LOG_NOTICE("%s " MAGENTA_BOLD("start benchmark ") "hashes " CYAN_BOLD("%" PRIu64 "M") " algo " WHITE_BOLD("%s") " print_time " CYAN_BOLD("%us"),
Tags::bench(),
pool.benchSize() / 1000000,
@ -270,7 +272,7 @@ void xmrig::Network::setJob(IClient *client, const Job &job, bool donate)
const char *scale = NetworkState::scaleDiff(diff);
# ifdef XMRIG_FEATURE_BENCHMARK
if (!job.bench())
if (!m_benchSize)
# endif
{
if (job.height()) {

View file

@ -92,6 +92,7 @@ private:
IStrategy *m_strategy = nullptr;
NetworkState *m_state = nullptr;
Timer *m_timer = nullptr;
uint32_t m_benchSize = 0;
};