Electroneum
cryptonote::tx_extra_padding Struct Reference

#include <tx_extra.h>

Collaboration diagram for cryptonote::tx_extra_padding:

Public Member Functions

template<template< bool > class Archive>
bool do_serialize (Archive< false > &ar)
 
template<template< bool > class Archive>
bool do_serialize (Archive< true > &ar)
 

Public Attributes

size_t size
 

Detailed Description

Definition at line 52 of file tx_extra.h.

Member Function Documentation

◆ do_serialize() [1/2]

template<template< bool > class Archive>
bool cryptonote::tx_extra_padding::do_serialize ( Archive< false > &  ar)
inline

Definition at line 58 of file tx_extra.h.

59  {
60  // size - 1 - because of variant tag
61  for (size = 1; size <= TX_EXTRA_PADDING_MAX_COUNT; ++size)
62  {
63  std::ios_base::iostate state = ar.stream().rdstate();
64  bool eof = EOF == ar.stream().peek();
65  ar.stream().clear(state);
66 
67  if (eof)
68  break;
69 
70  uint8_t zero;
71  if (!::do_serialize(ar, zero))
72  return false;
73 
74  if (0 != zero)
75  return false;
76  }
77 
79  }
#define TX_EXTRA_PADDING_MAX_COUNT
Definition: tx_extra.h:35
unsigned char uint8_t
Definition: stdint.h:124
bool do_serialize(Archive< false > &ar)
Definition: tx_extra.h:58
Definition: blake256.h:37
key zero()
Definition: rctOps.h:70
Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_serialize() [2/2]

template<template< bool > class Archive>
bool cryptonote::tx_extra_padding::do_serialize ( Archive< true > &  ar)
inline

Definition at line 83 of file tx_extra.h.

84  {
86  return false;
87 
88  // i = 1 - because of variant tag
89  for (size_t i = 1; i < size; ++i)
90  {
91  uint8_t zero = 0;
92  if (!::do_serialize(ar, zero))
93  return false;
94  }
95  return true;
96  }
#define TX_EXTRA_PADDING_MAX_COUNT
Definition: tx_extra.h:35
unsigned char uint8_t
Definition: stdint.h:124
bool do_serialize(Archive< false > &ar)
Definition: tx_extra.h:58
key zero()
Definition: rctOps.h:70
Here is the call graph for this function:

Member Data Documentation

◆ size

size_t cryptonote::tx_extra_padding::size

Definition at line 54 of file tx_extra.h.


The documentation for this struct was generated from the following file: