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/rctOps.h"
BOOST_CLASS_VERSION(rct::ecdhTuple, 1)
//namespace cryptonote {
namespace boost
{
@ -248,20 +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;
}
template <class Archive>