Fixed --token option.

This commit is contained in:
XMRig 2020-11-16 18:53:24 +07:00
parent 8f3a2a63ba
commit 12a1365b5d
No known key found for this signature in database
GPG key ID: 446A53638BE94409

View file

@ -113,7 +113,7 @@ void xmrig::BenchClient::setPool(const Pool &pool)
void xmrig::BenchClient::onBenchDone(uint64_t result, uint64_t ts) void xmrig::BenchClient::onBenchDone(uint64_t result, uint64_t ts)
{ {
# ifdef XMRIG_FEATURE_HTTP # ifdef XMRIG_FEATURE_HTTP
if (m_mode == ONLINE_BENCH) { if (!m_token.isEmpty()) {
m_doneTime = ts; m_doneTime = ts;
rapidjson::Document doc(rapidjson::kObjectType); rapidjson::Document doc(rapidjson::kObjectType);
@ -173,20 +173,23 @@ void xmrig::BenchClient::onHttpData(const HttpData &data)
return setError(data.statusName()); return setError(data.statusName());
} }
if (m_mode == ONLINE_BENCH) { if (m_doneTime) {
if (!m_startTime) { LOG_NOTICE("%s " WHITE_BOLD("benchmark submitted ") CYAN_BOLD("https://xmrig.com/benchmark/%s"), Tags::bench(), m_job.id().data());
return startBench(doc); printExit();
}
if (m_doneTime) {
LOG_NOTICE("%s " WHITE_BOLD("benchmark submitted ") CYAN_BOLD("https://xmrig.com/benchmark/%s"), Tags::bench(), m_job.id().data());
printExit();
}
return; return;
} }
startVerify(doc); if (m_startTime) {
return;
}
if (m_mode == ONLINE_BENCH) {
startBench(doc);
}
else {
startVerify(doc);
}
# endif # endif
} }