From c807e955d31cc4e64b38661add57eed7b164f9f0 Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Mon, 25 Oct 2021 03:54:20 -0600 Subject: [PATCH] Fix upstream benchmark feature clash with MoBenchmark --- src/App.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/App.cpp b/src/App.cpp index 681fd0db..17e482e1 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -86,20 +86,21 @@ int xmrig::App::exec() } # ifdef XMRIG_FEATURE_MO_BENCHMARK - m_controller->pre_start(); - m_controller->config()->benchmark().set_controller(m_controller); + if (pool.mode() != Pool::MODE_BENCHMARK) { + m_controller->pre_start(); + m_controller->config()->benchmark().set_controller(m_controller); - if (m_controller->config()->benchmark().isNewBenchRun() || m_controller->config()->isRebenchAlgo()) { - if (m_controller->config()->isShouldSave()) { - m_controller->config()->save(); + if (m_controller->config()->benchmark().isNewBenchRun() || m_controller->config()->isRebenchAlgo()) { + if (m_controller->config()->isShouldSave()) { + m_controller->config()->save(); + } + m_controller->config()->benchmark().start(); + } else { + m_controller->start(); } - m_controller->config()->benchmark().start(); - } else { - m_controller->start(); - } -# else - m_controller->start(); + } else # endif + m_controller->start(); rc = uv_run(uv_default_loop(), UV_RUN_DEFAULT); uv_loop_close(uv_default_loop());