ringct: fix v1 ecdhInfo serialization

The change made for v2 broke v1, and we have no way to know which
version we're serializing here. However, since we don't actually
care about space savings in this case, we continue serialiazing
both mask and amount.
This commit is contained in:
moneromooo-monero 2019-02-03 10:29:36 +00:00 committed by wowario
parent 33a76e92f4
commit 423cf4406d
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111

View File

@ -45,8 +45,6 @@
#include "ringct/rctTypes.h"
#include "ringct/rctOps.h"
BOOST_CLASS_VERSION(rct::ecdhTuple, 1)
//namespace cryptonote {
namespace boost
{
@ -248,21 +246,9 @@ namespace boost
template <class Archive>
inline void serialize(Archive &a, rct::ecdhTuple &x, const boost::serialization::version_type ver)
{
if (ver < 1)
{
a & x.mask;
a & x.amount;
return;
}
crypto::hash8 &amount = (crypto::hash8&)x.amount;
if (!Archive::is_saving::value)
{
memset(&x.mask, 0, sizeof(x.mask));
memset(&x.amount, 0, sizeof(x.amount));
}
a & amount;
// a & x.senderPk; // not serialized, as we do not use it in monero currently
}
template <class Archive>