mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-25 20:16:05 +00:00
Merge branch 'dev' into evo
This commit is contained in:
commit
daed23422e
2 changed files with 6 additions and 2 deletions
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
|
|
||||||
|
|
||||||
#include "3rdparty/http-parser/http_parser.h"
|
#include "3rdparty/http-parser/http_parser.h"
|
||||||
|
@ -225,6 +225,10 @@ bool xmrig::DaemonClient::parseJob(const rapidjson::Value ¶ms, int *code)
|
||||||
job.setDiff(Json::getUint64(params, "difficulty"));
|
job.setDiff(Json::getUint64(params, "difficulty"));
|
||||||
job.setId(blocktemplate.data() + blocktemplate.size() - 32);
|
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_job = std::move(job);
|
||||||
m_blocktemplate = std::move(blocktemplate);
|
m_blocktemplate = std::move(blocktemplate);
|
||||||
m_prevHash = Json::getString(params, "prev_hash");
|
m_prevHash = Json::getString(params, "prev_hash");
|
||||||
|
|
|
@ -174,7 +174,7 @@ bool xmrig::Pool::isEnabled() const
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
if (isDaemon() && !algorithm().isValid()) {
|
if (isDaemon() && (!algorithm().isValid() && !coin().isValid())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue