aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/cryptonote_format_utils.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-02-07 19:07:36 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-05 18:18:39 +0000
commit608fd6f14a6b9c0eeba2843fb14cbb235be0034f (patch)
treecde1b94ca58309ebc3711294bcade24adc2fd172 /src/cryptonote_basic/cryptonote_format_utils.cpp
parentMerge pull request #3261 (diff)
downloadmonero-608fd6f14a6b9c0eeba2843fb14cbb235be0034f.tar.xz
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.
Diffstat (limited to 'src/cryptonote_basic/cryptonote_format_utils.cpp')
-rw-r--r--src/cryptonote_basic/cryptonote_format_utils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp
index f462d1ca9..a10772424 100644
--- a/src/cryptonote_basic/cryptonote_format_utils.cpp
+++ b/src/cryptonote_basic/cryptonote_format_utils.cpp
@@ -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;
}
//---------------------------------------------------------------