aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-09-14 20:23:06 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-09-14 20:23:06 +0100
commit7d413f635fb42f8cfe7567b07e981f3a312f8900 (patch)
treeda4a3fb2f6c3b37b6fdb53632978311b05844d49 /tests/unit_tests
parentcore: cleanup some typecasting (diff)
downloadmonero-7d413f635fb42f8cfe7567b07e981f3a312f8900.tar.xz
rct: rework serialization to avoid storing vector sizes
Diffstat (limited to 'tests/unit_tests')
-rw-r--r--tests/unit_tests/serialization.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/unit_tests/serialization.cpp b/tests/unit_tests/serialization.cpp
index 40209f6ed..f51f9ec67 100644
--- a/tests/unit_tests/serialization.cpp
+++ b/tests/unit_tests/serialization.cpp
@@ -589,6 +589,7 @@ TEST(Serialization, serializes_ringct_types)
ASSERT_TRUE(serialization::parse_binary(blob, rg1));
ASSERT_TRUE(!memcmp(&rg0, &rg1, sizeof(rg0)));
+#if 0
ASSERT_TRUE(serialization::dump_binary(s0, blob));
ASSERT_TRUE(serialization::parse_binary(blob, s1));
ASSERT_TRUE(s0.type == s1.type);
@@ -621,16 +622,18 @@ TEST(Serialization, serializes_ringct_types)
// serialization only does the mask
ASSERT_TRUE(!memcmp(&s0.outPk[n].mask, &s1.outPk[n].mask, sizeof(s0.outPk[n].mask)));
}
+#endif
tx0.set_null();
tx0.version = 2;
cryptonote::txin_to_key txin_to_key1;
- txin_to_key1.key_offsets.resize(2);
+ txin_to_key1.key_offsets.resize(4);
cryptonote::txin_to_key txin_to_key2;
- txin_to_key2.key_offsets.resize(2);
+ txin_to_key2.key_offsets.resize(4);
tx0.vin.push_back(txin_to_key1);
tx0.vin.push_back(txin_to_key2);
tx0.vout.push_back(cryptonote::tx_out());
+ tx0.vout.push_back(cryptonote::tx_out());
tx0.rct_signatures = s0;
ASSERT_EQ(tx0.rct_signatures.p.rangeSigs.size(), 2);
ASSERT_TRUE(serialization::dump_binary(tx0, blob));