veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
altintegration::PopData Struct Reference

Represents ALT block body of POP-related info. More...

Detailed Description

Version
1

Definition at line 27 of file popdata.hpp.

#include <popdata.hpp>

+ Collaboration diagram for altintegration::PopData:

Public Types

using id_t = uint256
 

Public Member Functions

uint256 getMerkleRoot () const
 
void mergeFrom (const PopData &p)
 
void clear ()
 
void toVbkEncoding (WriteStream &stream) const
 Convert PopData to data stream using Vbk byte format. More...
 
std::vector< uint8_t > toVbkEncoding () const
 Convert PopData to raw bytes data using Vbk byte format. More...
 
size_t estimateSize () const
 
std::string toPrettyString () const
 
bool empty () const
 

Static Public Member Functions

static uint256 getMerkleRoot (uint32_t version, const std::vector< ATV::id_t > &atvs, const std::vector< VTB::id_t > &vtbs, const std::vector< VbkBlock::id_t > &vbks)
 

Public Attributes

uint32_t version = 1
 
std::vector< VbkBlockcontext
 
std::vector< VTBvtbs {}
 
std::vector< ATVatvs {}
 
bool checked = false
 

Friends

bool operator== (const PopData &a, const PopData &b)
 

Member Typedef Documentation

◆ id_t

Definition at line 28 of file popdata.hpp.

Member Function Documentation

◆ clear()

void altintegration::PopData::clear ( )
inline

Definition at line 48 of file popdata.hpp.

48 {
49 context.clear();
50 vtbs.clear();
51 atvs.clear();
52 }

◆ empty()

bool altintegration::PopData::empty ( ) const
inline

Definition at line 70 of file popdata.hpp.

70{ return context.empty() && atvs.empty() && vtbs.empty(); }

◆ mergeFrom()

void altintegration::PopData::mergeFrom ( const PopData p)
inline

Definition at line 42 of file popdata.hpp.

42 {
43 context.insert(context.end(), p.context.begin(), p.context.end());
44 vtbs.insert(vtbs.end(), p.vtbs.begin(), p.vtbs.end());
45 atvs.insert(atvs.end(), p.atvs.begin(), p.atvs.end());
46 }

◆ toVbkEncoding() [1/2]

std::vector< uint8_t > altintegration::PopData::toVbkEncoding ( ) const
Returns
bytes data

◆ toVbkEncoding() [2/2]

void altintegration::PopData::toVbkEncoding ( WriteStream stream) const
Parameters
streamdata stream to write into

Friends And Related Function Documentation

◆ operator==

bool operator== ( const PopData a,
const PopData b 
)
friend

Definition at line 72 of file popdata.hpp.

72 {
73 // clang-format off
74 return a.toVbkEncoding() == b.toVbkEncoding();
75 // clang-format on
76 }

Member Data Documentation

◆ atvs

std::vector<ATV> altintegration::PopData::atvs {}

Definition at line 33 of file popdata.hpp.

◆ checked

bool altintegration::PopData::checked = false
mutable

Definition at line 80 of file popdata.hpp.

◆ context

std::vector<VbkBlock> altintegration::PopData::context

Definition at line 31 of file popdata.hpp.

◆ version

uint32_t altintegration::PopData::version = 1

Definition at line 30 of file popdata.hpp.

◆ vtbs

std::vector<VTB> altintegration::PopData::vtbs {}

Definition at line 32 of file popdata.hpp.


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