Cryptonight variant 4 aka cn/wow

This commit is contained in:
wowario
2019-05-17 04:20:14 +03:00
parent a3c020b4ee
commit f943a83b71
3 changed files with 193 additions and 353 deletions
@@ -1205,7 +1205,7 @@ namespace cryptonote
bool get_block_longhash(const block& b, crypto::hash& res, uint64_t height)
{
blobdata bd = get_block_hashing_blob(b);
const int cn_variant = b.major_version >= 7 ? b.major_version - 6 : 0;
const int cn_variant = b.major_version >= 11 ? 4 : b.major_version >= 9 && b.major_version <= 10 ? 2 : 1;
crypto::cn_slow_hash(bd.data(), bd.size(), res, cn_variant, height);
return true;
}