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

Veriblock to Bitcoin publication, committed to Veriblock blockchain in containingBlock. More...

Detailed Description

Definition at line 37 of file vtb.hpp.

#include <vtb.hpp>

+ Collaboration diagram for altintegration::VTB:

Public Types

using id_t = uint256
 
using containing_block_t = VbkBlock
 

Public Member Functions

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

Static Public Member Functions

static const std::string & name ()
 

Public Attributes

uint32_t version = 1
 
VbkPopTx transaction {}
 
VbkMerklePath merklePath {}
 
containing_block_t containingBlock {}
 
bool checked {false}
 (memory only) indicates whether we already did 'checkPayloads' on this VTB More...
 

Friends

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

Member Typedef Documentation

◆ containing_block_t

Definition at line 39 of file vtb.hpp.

◆ id_t

Definition at line 38 of file vtb.hpp.

Member Function Documentation

◆ getId()

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

◆ name()

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

Definition at line 72 of file vtb.hpp.

72{ return _name; }

◆ toVbkEncoding() [1/2]

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

◆ toVbkEncoding() [2/2]

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

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 78 of file vtb.hpp.

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

◆ operator<

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

Definition at line 80 of file vtb.hpp.

80 {
81 return a.containingBlock.getHeight() < b.containingBlock.getHeight();
82 }

◆ operator==

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

Definition at line 74 of file vtb.hpp.

74 {
75 return a.getId() == b.getId();
76 }

Member Data Documentation

◆ checked

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

Definition at line 47 of file vtb.hpp.

◆ containingBlock

containing_block_t altintegration::VTB::containingBlock {}

Definition at line 44 of file vtb.hpp.

◆ merklePath

VbkMerklePath altintegration::VTB::merklePath {}

Definition at line 43 of file vtb.hpp.

◆ transaction

VbkPopTx altintegration::VTB::transaction {}

Definition at line 42 of file vtb.hpp.

◆ version

uint32_t altintegration::VTB::version = 1

Definition at line 41 of file vtb.hpp.


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