mirror of
https://github.com/monero-project/monero.git
synced 2024-11-18 00:37:43 +00:00
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:
parent
31bdf7bd11
commit
529645014c
1 changed files with 2 additions and 15 deletions
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue