Cryptonight variant 2 support

Reference code: https://github.com/monero-project/monero/pull/4218
This commit is contained in:
SChernykh 2018-08-28 23:42:15 +02:00
parent f7b029eb05
commit 36a562e1f1
11 changed files with 485 additions and 390 deletions

View file

@ -178,7 +178,12 @@ xmrig::Variant Job::variant() const
}
if (m_algorithm.variant() == xmrig::VARIANT_AUTO) {
return m_algorithm.algo() == xmrig::CRYPTONIGHT_HEAVY ? xmrig::VARIANT_0 : xmrig::VARIANT_1;
if (m_algorithm.algo() == xmrig::CRYPTONIGHT_HEAVY) {
return xmrig::VARIANT_0;
} else if (m_algorithm.algo() == xmrig::CRYPTONIGHT_LITE) {
return xmrig::VARIANT_1;
}
return (m_blob[0] >= 8) ? xmrig::VARIANT_2 : xmrig::VARIANT_1;
}
return m_algorithm.variant();