mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-23 09:58:52 +00:00
set pow variants
This commit is contained in:
parent
84f49bed65
commit
5c29f2b10c
@ -697,7 +697,7 @@ namespace cryptonote
|
||||
}
|
||||
rx_slow_hash(hash.data, bd.data(), bd.size(), res.data);
|
||||
} else {
|
||||
const int pow_variant = major_version >= 7 ? major_version - 6 : 0;
|
||||
const int pow_variant = major_version >= 11 ? 4 : major_version >= 9 ? 2 : 1;
|
||||
crypto::cn_slow_hash(bd.data(), bd.size(), res, pow_variant, height);
|
||||
}
|
||||
return true;
|
||||
|
@ -1395,15 +1395,15 @@ namespace cryptonote
|
||||
if (lMiner.is_mining() || lMiner.get_is_background_mining_enabled())
|
||||
res.address = get_account_address_as_str(nettype(), false, lMiningAdr);
|
||||
const uint8_t major_version = m_core.get_blockchain_storage().get_current_hard_fork_version();
|
||||
const unsigned variant = major_version >= 7 ? major_version - 6 : 0;
|
||||
const unsigned variant = major_version >= 13 ? 6 : major_version >= 11 && major_version <= 12 ? 4 : 2;
|
||||
switch (variant)
|
||||
{
|
||||
case 0: res.pow_algorithm = "Cryptonight"; break;
|
||||
case 1: res.pow_algorithm = "CNv1 (Cryptonight variant 1)"; break;
|
||||
case 2: case 3: res.pow_algorithm = "CNv2 (Cryptonight variant 2)"; break;
|
||||
case 4: case 5: res.pow_algorithm = "CNv4 (Cryptonight variant 4)"; break;
|
||||
case 6: case 7: case 8: case 9: res.pow_algorithm = "RandomX"; break;
|
||||
default: res.pow_algorithm = "RandomX"; break; // assumed
|
||||
case 4: case 5: res.pow_algorithm = "CN/WOW"; break;
|
||||
case 6: case 7: case 8: case 9: res.pow_algorithm = "RandomWOW"; break;
|
||||
default: res.pow_algorithm = "RandomWOW"; break; // assumed
|
||||
}
|
||||
if (res.is_background_mining_enabled)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user