Added AEON v7 PoW change test vectors
This commit is contained in:
parent
4639fbe923
commit
e4da579afa
2 changed files with 50 additions and 30 deletions
|
@ -151,17 +151,17 @@ bool CryptoNight::selfTest(int algo)
|
|||
resultV1Pow = resultV1Pow && memcmp(output, algo == Options::ALGO_CRYPTONIGHT_LITE ? test_output_light : test_output, 160) == 0;
|
||||
}
|
||||
|
||||
// monero v2 pow
|
||||
// monero/aeon v2 pow (monero/aeon blockchain version 7)
|
||||
bool resultV2Pow = true;
|
||||
if (algo == Options::ALGO_CRYPTONIGHT && (Options::i()->forcePowVersion() == Options::PowVersion::POW_AUTODETECT || Options::i()->forcePowVersion() == Options::PowVersion::POW_V2)) {
|
||||
if (Options::i()->forcePowVersion() == Options::PowVersion::POW_AUTODETECT || Options::i()->forcePowVersion() == Options::PowVersion::POW_V2) {
|
||||
cryptonight_hash_ctx[0](test_input_monero_v2_pow_0, sizeof(test_input_monero_v2_pow_0), output, ctx);
|
||||
resultV2Pow = resultV2Pow && memcmp(output, test_output_monero_v2_pow[0], 32) == 0;
|
||||
resultV2Pow = resultV2Pow && memcmp(output, algo == Options::ALGO_CRYPTONIGHT_LITE ? test_output_monero_v2_pow_light[0] : test_output_monero_v2_pow[0], 32) == 0;
|
||||
|
||||
cryptonight_hash_ctx[1](test_input_monero_v2_pow_1, sizeof(test_input_monero_v2_pow_1), output, ctx);
|
||||
resultV2Pow = resultV2Pow && memcmp(output, test_output_monero_v2_pow[1], 32) == 0;
|
||||
resultV2Pow = resultV2Pow && memcmp(output, algo == Options::ALGO_CRYPTONIGHT_LITE ? test_output_monero_v2_pow_light[1] : test_output_monero_v2_pow[1], 32) == 0;
|
||||
|
||||
cryptonight_hash_ctx[2](test_input_monero_v2_pow_2, sizeof(test_input_monero_v2_pow_2), output, ctx);
|
||||
resultV2Pow = resultV2Pow && memcmp(output, test_output_monero_v2_pow[2], 32) == 0;
|
||||
resultV2Pow = resultV2Pow && memcmp(output, algo == Options::ALGO_CRYPTONIGHT_LITE ? test_output_monero_v2_pow_light[2] : test_output_monero_v2_pow[2], 32) == 0;
|
||||
//TODO test multihashs
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue