aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-06-28 16:03:28 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-28 21:28:58 +0100
commit6d0e47148bc400ca6668860e162fe2f4ad8a3dac (patch)
treeb9d5d32dc975b8811cf992c2f86a75d00bb5c815 /tests/unit_tests
parentringct: fix size unit mismatch calling keccak (diff)
downloadmonero-6d0e47148bc400ca6668860e162fe2f4ad8a3dac.tar.xz
rct: add the tx prefix hash into the MLSAG
to protect the non-signatures parts of the tx from tampering.
Diffstat (limited to 'tests/unit_tests')
-rw-r--r--tests/unit_tests/ringct.cpp10
-rw-r--r--tests/unit_tests/serialization.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/unit_tests/ringct.cpp b/tests/unit_tests/ringct.cpp
index 47da05f49..4b494edba 100644
--- a/tests/unit_tests/ringct.cpp
+++ b/tests/unit_tests/ringct.cpp
@@ -187,7 +187,7 @@ TEST(ringct, range_proofs)
destinations.push_back(Pk);
//compute rct data with mixin 500
- rctSig s = genRct(sc, pc, destinations, amounts, 3);
+ rctSig s = genRct(sc, pc, destinations, amounts, rct::zero(), 3);
//verify rct data
ASSERT_TRUE(verRct(s));
@@ -204,7 +204,7 @@ TEST(ringct, range_proofs)
//compute rct data with mixin 500
- s = genRct(sc, pc, destinations, amounts, 3);
+ s = genRct(sc, pc, destinations, amounts, rct::zero(), 3);
//verify rct data
ASSERT_FALSE(verRct(s));
@@ -248,7 +248,7 @@ TEST(ringct, range_proofs_with_fee)
destinations.push_back(Pk);
//compute rct data with mixin 500
- rctSig s = genRct(sc, pc, destinations, amounts, 3);
+ rctSig s = genRct(sc, pc, destinations, amounts, rct::zero(), 3);
//verify rct data
ASSERT_TRUE(verRct(s));
@@ -265,7 +265,7 @@ TEST(ringct, range_proofs_with_fee)
//compute rct data with mixin 500
- s = genRct(sc, pc, destinations, amounts, 3);
+ s = genRct(sc, pc, destinations, amounts, rct::zero(), 3);
//verify rct data
ASSERT_FALSE(verRct(s));
@@ -295,7 +295,7 @@ static rct::rctSig make_sample_rct_sig(int n_inputs, const uint64_t input_amount
destinations.push_back(Pk);
}
- return genRct(sc, pc, destinations, amounts, 3);;
+ return genRct(sc, pc, destinations, amounts, rct::zero(), 3);;
}
static bool range_proof_test(bool expected_valid,
diff --git a/tests/unit_tests/serialization.cpp b/tests/unit_tests/serialization.cpp
index 5223298cd..01dff3e99 100644
--- a/tests/unit_tests/serialization.cpp
+++ b/tests/unit_tests/serialization.cpp
@@ -565,7 +565,7 @@ TEST(Serialization, serializes_ringct_types)
rct::skpkGen(Sk, Pk);
destinations.push_back(Pk);
//compute rct data with mixin 500
- s0 = rct::genRct(sc, pc, destinations, amounts, 3);
+ s0 = rct::genRct(sc, pc, destinations, amounts, rct::zero(), 3);
mg0 = s0.MG;
ASSERT_TRUE(serialization::dump_binary(mg0, blob));