Fixed coin option in daemon mode.

This commit is contained in:
XMRig 2019-09-27 23:39:57 +07:00
parent e1d1a5226c
commit 550e332909
2 changed files with 6 additions and 2 deletions

View file

@ -25,7 +25,7 @@
#include <algorithm>
#include <assert.h>
#include <cassert>
#include "3rdparty/http-parser/http_parser.h"
@ -225,6 +225,10 @@ bool xmrig::DaemonClient::parseJob(const rapidjson::Value &params, int *code)
job.setDiff(Json::getUint64(params, "difficulty"));
job.setId(blocktemplate.data() + blocktemplate.size() - 32);
if (m_pool.coin().isValid()) {
job.setAlgorithm(m_pool.coin().algorithm(job.blob()[0]));
}
m_job = std::move(job);
m_blocktemplate = std::move(blocktemplate);
m_prevHash = Json::getString(params, "prev_hash");

View file

@ -174,7 +174,7 @@ bool xmrig::Pool::isEnabled() const
}
# endif
if (isDaemon() && !algorithm().isValid()) {
if (isDaemon() && (!algorithm().isValid() && !coin().isValid())) {
return false;
}