aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cryptonote_core/cryptonote_boost_serialization.h2
-rw-r--r--src/ringct/rctTypes.h2
-rw-r--r--tests/unit_tests/serialization.cpp4
3 files changed, 5 insertions, 3 deletions
diff --git a/src/cryptonote_core/cryptonote_boost_serialization.h b/src/cryptonote_core/cryptonote_boost_serialization.h
index 81f5f081a..f222db94e 100644
--- a/src/cryptonote_core/cryptonote_boost_serialization.h
+++ b/src/cryptonote_core/cryptonote_boost_serialization.h
@@ -219,7 +219,7 @@ namespace boost
{
a & x.mask;
a & x.amount;
- a & x.senderPk;
+ // a & x.senderPk; // not serialized, as we do not use it in monero currently
}
inline void serializeOutPk(boost::archive::binary_iarchive &a, rct::ctkeyV &outPk_, const boost::serialization::version_type ver)
diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h
index d36d3f1b1..1ba280aba 100644
--- a/src/ringct/rctTypes.h
+++ b/src/ringct/rctTypes.h
@@ -116,7 +116,7 @@ namespace rct {
BEGIN_SERIALIZE_OBJECT()
FIELD(mask)
FIELD(amount)
- FIELD(senderPk)
+ // FIELD(senderPk) // not serialized, as we do not use it in monero currently
END_SERIALIZE()
};
diff --git a/tests/unit_tests/serialization.cpp b/tests/unit_tests/serialization.cpp
index 0a53aeae0..0da23c0d2 100644
--- a/tests/unit_tests/serialization.cpp
+++ b/tests/unit_tests/serialization.cpp
@@ -532,7 +532,9 @@ TEST(Serialization, serializes_ringct_types)
ecdh0.senderPk = rct::skGen();
ASSERT_TRUE(serialization::dump_binary(ecdh0, blob));
ASSERT_TRUE(serialization::parse_binary(blob, ecdh1));
- ASSERT_TRUE(!memcmp(&ecdh0, &ecdh1, sizeof(ecdh0)));
+ ASSERT_TRUE(!memcmp(&ecdh0.mask, &ecdh1.mask, sizeof(ecdh0.mask)));
+ ASSERT_TRUE(!memcmp(&ecdh0.amount, &ecdh1.amount, sizeof(ecdh0.amount)));
+ // senderPk is not serialized
for (size_t n = 0; n < 64; ++n)
{