diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-02-03 10:29:36 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-02-03 10:33:10 +0000 |
commit | 529645014ccee2e57b1ce964f9f8c5caa3850bfb (patch) | |
tree | 7bf1b20e54fb260867b4c73d63f06b3c92dfa719 /src/cryptonote_basic/cryptonote_boost_serialization.h | |
parent | Merge pull request #4988 (diff) | |
download | monero-529645014ccee2e57b1ce964f9f8c5caa3850bfb.tar.xz |
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.
Diffstat (limited to 'src/cryptonote_basic/cryptonote_boost_serialization.h')
-rw-r--r-- | src/cryptonote_basic/cryptonote_boost_serialization.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/cryptonote_basic/cryptonote_boost_serialization.h b/src/cryptonote_basic/cryptonote_boost_serialization.h index a4228b849..d1e321994 100644 --- a/src/cryptonote_basic/cryptonote_boost_serialization.h +++ b/src/cryptonote_basic/cryptonote_boost_serialization.h @@ -45,8 +45,6 @@ #include "ringct/rctTypes.h" #include "ringct/rctOps.h" -BOOST_CLASS_VERSION(rct::ecdhTuple, 1) - //namespace cryptonote { namespace boost { @@ -249,19 +247,8 @@ 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.mask; + a & x.amount; } template <class Archive> |