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

Atlchain endorsement. More...

Detailed Description

Definition at line 36 of file atv.hpp.

#include <atv.hpp>

+ Collaboration diagram for altintegration::ATV:

Public Types

using id_t = uint256
 

Public Member Functions

std::string toPrettyString () const
 create pretty string
 
std::string toShortPrettyString () const
 
void toVbkEncoding (WriteStream &stream) const
 Convert ATV to data stream using Vbk byte format. More...
 
std::vector< uint8_t > toVbkEncoding () const
 Convert ATV to raw bytes data using Vbk byte format. More...
 
size_t estimateSize () const
 Estimate serialization size.
 
id_t getId () const
 Calculate a ATV id that is the sha256 hash of the ATV rawBytes. More...
 

Static Public Member Functions

static const std::string & name ()
 

Public Attributes

uint32_t version = 1
 ATV serialization version. More...
 
VbkTx transaction {}
 endorsing transaction. More...
 
VbkMerklePath merklePath {}
 merkle path that proves that endorsing transaction is in blockOfProof. More...
 
VbkBlock blockOfProof {}
 VBK block which contains endorsing transaction. More...
 
bool checked {false}
 (memory only) indicates whether we already did 'checkATV' on this ATV More...
 

Friends

bool operator== (const ATV &a, const ATV &b)
 
bool operator!= (const ATV &a, const ATV &b)
 
bool operator< (const ATV &a, const ATV &b)
 

Member Typedef Documentation

◆ id_t

Definition at line 37 of file atv.hpp.

Member Function Documentation

◆ getId()

id_t altintegration::ATV::getId ( ) const
Returns
id sha256 hash

◆ name()

static const std::string & altintegration::ATV::name ( )
inlinestatic

Definition at line 79 of file atv.hpp.

79{ return _name; }

◆ toVbkEncoding() [1/2]

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

◆ toVbkEncoding() [2/2]

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

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const ATV a,
const ATV b 
)
friend

Definition at line 85 of file atv.hpp.

85{ return !(a == b); }

◆ operator<

bool operator< ( const ATV a,
const ATV b 
)
friend

Definition at line 87 of file atv.hpp.

87 {
88 return a.blockOfProof.getHeight() < b.blockOfProof.getHeight();
89 }

◆ operator==

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

Definition at line 81 of file atv.hpp.

81 {
82 return a.getId() == b.getId();
83 }

Member Data Documentation

◆ blockOfProof

VbkBlock altintegration::ATV::blockOfProof {}

Definition at line 49 of file atv.hpp.

◆ checked

bool altintegration::ATV::checked {false}
mutable

Definition at line 52 of file atv.hpp.

◆ merklePath

VbkMerklePath altintegration::ATV::merklePath {}

Definition at line 46 of file atv.hpp.

◆ transaction

VbkTx altintegration::ATV::transaction {}

Definition at line 43 of file atv.hpp.

◆ version

uint32_t altintegration::ATV::version = 1

Definition at line 40 of file atv.hpp.


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