diff options
Diffstat (limited to 'src/cryptonote_core/cryptonote_boost_serialization.h')
-rw-r--r-- | src/cryptonote_core/cryptonote_boost_serialization.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/cryptonote_core/cryptonote_boost_serialization.h b/src/cryptonote_core/cryptonote_boost_serialization.h index 7a7cf8588..09e9a7fa7 100644 --- a/src/cryptonote_core/cryptonote_boost_serialization.h +++ b/src/cryptonote_core/cryptonote_boost_serialization.h @@ -246,23 +246,36 @@ namespace boost } template <class Archive> - inline void serialize(Archive &a, rct::rctSig &x, const boost::serialization::version_type ver) + inline void serialize(Archive &a, rct::rctSigBase &x, const boost::serialization::version_type ver) { a & x.type; if (x.type != rct::RCTTypeFull && x.type != rct::RCTTypeSimple) throw boost::archive::archive_exception(boost::archive::archive_exception::other_exception, "Unsupported rct type"); // a & x.message; message is not serialized, as it can be reconstructed from the tx data - a & x.rangeSigs; + // a & x.mixRing; mixRing is not serialized, as it can be reconstructed from the offsets if (x.type == rct::RCTTypeSimple) - a & x.MGs; - if (x.type == rct::RCTTypeFull) - a & x.MG; + a & x.pseudoOuts; + a & x.ecdhInfo; + serializeOutPk(a, x.outPk, ver); + a & x.txnFee; + } + + template <class Archive> + inline void serialize(Archive &a, rct::rctSig &x, const boost::serialization::version_type ver) + { + a & x.type; + if (x.type != rct::RCTTypeFull && x.type != rct::RCTTypeSimple) + throw boost::archive::archive_exception(boost::archive::archive_exception::other_exception, "Unsupported rct type"); + // a & x.message; message is not serialized, as it can be reconstructed from the tx data // a & x.mixRing; mixRing is not serialized, as it can be reconstructed from the offsets if (x.type == rct::RCTTypeSimple) a & x.pseudoOuts; a & x.ecdhInfo; serializeOutPk(a, x.outPk, ver); a & x.txnFee; + //-------------- + a & x.p.rangeSigs; + a & x.p.MGs; } } } |