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

Path in Merkle tree, which proves that subject exists in the tree. More...

Detailed Description

Definition at line 29 of file vbk_merkle_path.hpp.

#include <vbk_merkle_path.hpp>

+ Collaboration diagram for altintegration::VbkMerklePath:

Public Member Functions

void toVbkEncoding (WriteStream &stream) const
 Convert VbkMerklePath to data stream using VbkMerklePath VBK byte format. More...
 
size_t estimateSize () const
 
uint128 calculateMerkleRoot () const
 Calculate the hash of the vb merkle root. More...
 
std::vector< uint32_t > equalLayerIndexes () const
 Return layer indexes where left and right nodes are equal. More...
 

Public Attributes

int32_t treeIndex = 0
 an indentifier of which transactions tree (pop=0, normal=1) More...
 
int32_t index {}
 the index of the bottom data TxID in the block it came from More...
 
uint256 subject {}
 TxID that this merkle path authenticates. More...
 
std::vector< uint256layers {}
 the layers in the merkle path More...
 

Member Function Documentation

◆ calculateMerkleRoot()

uint128 altintegration::VbkMerklePath::calculateMerkleRoot ( ) const
Returns
hash merkle root hash

◆ equalLayerIndexes()

std::vector< uint32_t > altintegration::VbkMerklePath::equalLayerIndexes ( ) const
Returns
indexes vector

◆ toVbkEncoding()

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

Member Data Documentation

◆ index

int32_t altintegration::VbkMerklePath::index {}

Definition at line 33 of file vbk_merkle_path.hpp.

◆ layers

std::vector<uint256> altintegration::VbkMerklePath::layers {}

Definition at line 37 of file vbk_merkle_path.hpp.

◆ subject

uint256 altintegration::VbkMerklePath::subject {}

Definition at line 35 of file vbk_merkle_path.hpp.

◆ treeIndex

int32_t altintegration::VbkMerklePath::treeIndex = 0

Definition at line 31 of file vbk_merkle_path.hpp.


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