Monero Cryptonight variants, and add one for v7

This is the first variant of many, with the intent to improve
Monero's resistance to ASICs and encourage mining decentralization.
This commit is contained in:
moneromooo-monero 2018-02-07 19:07:36 +00:00
parent 0d150aca5c
commit 608fd6f14a
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
9 changed files with 71 additions and 17 deletions

View file

@ -1022,7 +1022,8 @@ namespace cryptonote
return true;
}
blobdata bd = get_block_hashing_blob(b);
crypto::cn_slow_hash(bd.data(), bd.size(), res);
const int cn_variant = b.major_version >= 7 ? b.major_version - 6 : 0;
crypto::cn_slow_hash(bd.data(), bd.size(), res, cn_variant);
return true;
}
//---------------------------------------------------------------