update constants for yadacoin

This commit is contained in:
Matthew Vogel 2024-07-31 23:45:34 -07:00
parent 5f6bcfe949
commit 5342f25fbf
8 changed files with 38 additions and 9 deletions

View file

@ -118,15 +118,19 @@ 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())));
}
else if (size == 8) {
m_target = *reinterpret_cast<const uint64_t *>(raw.data());
if (algorithm() == Algorithm::RX_YADA) {
m_target = strtoull(target, nullptr, 16);
}
else {
return false;
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
@ -176,6 +180,7 @@ int32_t xmrig::Job::nonceOffset() const
auto f = algorithm().family();
if (f == Algorithm::KAWPOW) return 32;
if (f == Algorithm::GHOSTRIDER) return 76;
if (f == Algorithm::RX_YADA) return 147;
return 39;
}