mirror of
https://github.com/xmrig/xmrig.git
synced 2026-01-18 21:22:50 -05:00
Add "rx/yada" algorithm
This commit is contained in:
@@ -111,14 +111,22 @@ bool xmrig::Job::setTarget(const char *target)
|
||||
const auto raw = Cvt::fromHex(target, strlen(target));
|
||||
const size_t size = raw.size();
|
||||
|
||||
if (size == 4) {
|
||||
m_target = 0xFFFFFFFFFFFFFFFFULL / (0xFFFFFFFFULL / uint64_t(*reinterpret_cast<const uint32_t *>(raw.data())));
|
||||
# ifdef XMRIG_ALGO_RX_YADA
|
||||
if (algorithm() == Algorithm::RX_YADA) {
|
||||
m_target = strtoull(target, nullptr, 16);
|
||||
}
|
||||
else if (size == 8) {
|
||||
m_target = *reinterpret_cast<const uint64_t *>(raw.data());
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
else
|
||||
# endif
|
||||
{
|
||||
if (size == 4) {
|
||||
m_target = 0xFFFFFFFFFFFFFFFFULL / (0xFFFFFFFFULL / uint64_t(*reinterpret_cast<const uint32_t *>(raw.data())));
|
||||
}
|
||||
else if (size == 8) {
|
||||
m_target = *reinterpret_cast<const uint64_t *>(raw.data());
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
# ifdef XMRIG_PROXY_PROJECT
|
||||
|
||||
Reference in New Issue
Block a user