Merge pull request #5122

52964501 ringct: fix v1 ecdhInfo serialization (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2019-03-04 12:08:26 +02:00
commit 35e0bf2e06
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -45,8 +45,6 @@
#include "ringct/rctTypes.h" #include "ringct/rctTypes.h"
#include "ringct/rctOps.h" #include "ringct/rctOps.h"
BOOST_CLASS_VERSION(rct::ecdhTuple, 1)
//namespace cryptonote { //namespace cryptonote {
namespace boost namespace boost
{ {
@ -249,19 +247,8 @@ namespace boost
template <class Archive> template <class Archive>
inline void serialize(Archive &a, rct::ecdhTuple &x, const boost::serialization::version_type ver) inline void serialize(Archive &a, rct::ecdhTuple &x, const boost::serialization::version_type ver)
{ {
if (ver < 1) a & x.mask;
{ a & x.amount;
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;
} }
template <class Archive> template <class Archive>