diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-11-01 21:49:30 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-11-01 21:49:30 +0200 |
commit | d51f1af75f782495a59e8af511f32aeadd7cd94e (patch) | |
tree | bc3c1de4bb5e3f3e9c49f187899a490acf3d68f4 /tests | |
parent | Merge pull request #1278 (diff) | |
parent | monero.supp: valgrind suppressions file (diff) | |
download | monero-d51f1af75f782495a59e8af511f32aeadd7cd94e.tar.xz |
Merge pull request #1272
48b57d8 monero.supp: valgrind suppressions file (moneromooo-monero)
ffd8c41 ringct: check the size of amount_keys is the same as destinations (moneromooo-monero)
836669d ringct: always shutdown the boost io service (moneromooo-monero)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit_tests/ringct.cpp | 5 | ||||
-rw-r--r-- | tests/unit_tests/serialization.cpp | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/unit_tests/ringct.cpp b/tests/unit_tests/ringct.cpp index 224e32e61..1abf2511d 100644 --- a/tests/unit_tests/ringct.cpp +++ b/tests/unit_tests/ringct.cpp @@ -246,7 +246,6 @@ TEST(ringct, range_proofs_with_fee) //add txn fee for 1 //has no corresponding destination.. amounts.push_back(1); - amount_keys.push_back(hash_to_scalar(zero())); //add output for 12500 amounts.push_back(12500); @@ -356,10 +355,12 @@ static rct::rctSig make_sample_rct_sig(int n_inputs, const uint64_t input_amount for (int n = 0; n < n_outputs; ++n) { amounts.push_back(output_amounts[n]); - amount_keys.push_back(rct::hash_to_scalar(rct::zero())); skpkGen(Sk, Pk); if (n < n_outputs - 1 || !last_is_fee) + { destinations.push_back(Pk); + amount_keys.push_back(rct::hash_to_scalar(rct::zero())); + } } return genRct(rct::zero(), sc, pc, destinations, amounts, amount_keys, 3);; diff --git a/tests/unit_tests/serialization.cpp b/tests/unit_tests/serialization.cpp index f51f9ec67..dc7f7cb06 100644 --- a/tests/unit_tests/serialization.cpp +++ b/tests/unit_tests/serialization.cpp @@ -559,6 +559,7 @@ TEST(Serialization, serializes_ringct_types) rct::keyV amount_keys; //add output 500 amounts.push_back(500); + amount_keys.push_back(rct::hash_to_scalar(rct::zero())); rct::keyV destinations; rct::key Sk, Pk; rct::skpkGen(Sk, Pk); |