Electroneum
Loading...
Searching...
No Matches
rct::rctSigBase Struct Reference

#include <rctTypes.h>

Inheritance diagram for rct::rctSigBase:
Collaboration diagram for rct::rctSigBase:

Public Member Functions

template<bool W, template< bool > class Archive>
bool serialize_rctsig_base (Archive< W > &ar, size_t inputs, size_t outputs)

Public Attributes

uint8_t type
key message
ctkeyM mixRing
keyV pseudoOuts
std::vector< ecdhTupleecdhInfo
ctkeyV outPk
etn_amount txnFee

Detailed Description

Definition at line 240 of file rctTypes.h.

Member Function Documentation

◆ serialize_rctsig_base()

template<bool W, template< bool > class Archive>
bool rct::rctSigBase::serialize_rctsig_base ( Archive< W > & ar,
size_t inputs,
size_t outputs )
inline

Definition at line 251 of file rctTypes.h.

252 {
253 FIELD(type)
254 if (type == RCTTypeNull)
255 return ar.stream().good();
257 return false;
259 // inputs/outputs not saved, only here for serialization help
260 // FIELD(message) - not serialized, it can be reconstructed
261 // FIELD(mixRing) - not serialized, it can be reconstructed
262 if (type == RCTTypeSimple) // moved to prunable with bulletproofs
263 {
264 ar.tag("pseudoOuts");
265 ar.begin_array();
267 if (pseudoOuts.size() != inputs)
268 return false;
269 for (size_t i = 0; i < inputs; ++i)
270 {
272 if (inputs - i > 1)
273 ar.delimit_array();
274 }
275 ar.end_array();
276 }
277
278 ar.tag("ecdhInfo");
279 ar.begin_array();
281 if (ecdhInfo.size() != outputs)
282 return false;
283 for (size_t i = 0; i < outputs; ++i)
284 {
286 {
287 ar.begin_object();
288 if (!typename Archive<W>::is_saving())
289 memset(ecdhInfo[i].amount.bytes, 0, sizeof(ecdhInfo[i].amount.bytes));
290 crypto::hash8 &amount = (crypto::hash8&)ecdhInfo[i].amount;
291 FIELD(amount);
292 ar.end_object();
293 }
294 else
295 {
296 FIELDS(ecdhInfo[i])
297 }
298 if (outputs - i > 1)
299 ar.delimit_array();
300 }
301 ar.end_array();
302
303 ar.tag("outPk");
304 ar.begin_array();
306 if (outPk.size() != outputs)
307 return false;
308 for (size_t i = 0; i < outputs; ++i)
309 {
310 FIELDS(outPk[i].mask)
311 if (outputs - i > 1)
312 ar.delimit_array();
313 }
314 ar.end_array();
315 return ar.stream().good();
316 }
POD_CLASS hash8
Definition hash.h:53
@ RCTTypeFull
Definition rctTypes.h:230
@ RCTTypeSimple
Definition rctTypes.h:231
@ RCTTypeBulletproof2
Definition rctTypes.h:233
@ RCTTypeBulletproof
Definition rctTypes.h:232
@ RCTTypeNull
Definition rctTypes.h:229
#define FIELD(f)
#define PREPARE_CUSTOM_VECTOR_SERIALIZATION(size, vec)
#define FIELDS(f)
#define VARINT_FIELD(f)
etn_amount txnFee
Definition rctTypes.h:248
std::vector< ecdhTuple > ecdhInfo
Definition rctTypes.h:246
Here is the caller graph for this function:

Member Data Documentation

◆ ecdhInfo

std::vector<ecdhTuple> rct::rctSigBase::ecdhInfo

Definition at line 246 of file rctTypes.h.

◆ message

key rct::rctSigBase::message

Definition at line 242 of file rctTypes.h.

◆ mixRing

ctkeyM rct::rctSigBase::mixRing

Definition at line 243 of file rctTypes.h.

◆ outPk

ctkeyV rct::rctSigBase::outPk

Definition at line 247 of file rctTypes.h.

◆ pseudoOuts

keyV rct::rctSigBase::pseudoOuts

Definition at line 245 of file rctTypes.h.

◆ txnFee

etn_amount rct::rctSigBase::txnFee

Definition at line 248 of file rctTypes.h.

◆ type

uint8_t rct::rctSigBase::type

Definition at line 241 of file rctTypes.h.


The documentation for this struct was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/src/ringct/rctTypes.h