aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_boost_serialization.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-09 21:34:09 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-28 21:30:18 +0100
commit93f5c625f058ee1f81c02c8bb03744b28bbde90a (patch)
tree3f8fd5da151bc7000963a50b6f29b0256a762eff /src/cryptonote_core/cryptonote_boost_serialization.h
parentrct: rework the verification preparation process (diff)
downloadmonero-93f5c625f058ee1f81c02c8bb03744b28bbde90a.tar.xz
rct: rework v2 txes into prunable and non prunable data
Nothing is pruned, but this allows easier changes later.
Diffstat (limited to 'src/cryptonote_core/cryptonote_boost_serialization.h')
-rw-r--r--src/cryptonote_core/cryptonote_boost_serialization.h23
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;
}
}
}