CCF
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ccf::MerkleTreeHistory Class Reference

#include <history.h>

Public Member Functions

 MerkleTreeHistory (MerkleTreeHistory const &)=delete
 
 MerkleTreeHistory (const std::vector< uint8_t > &serialised)
 
 MerkleTreeHistory (ccf::crypto::Sha256Hash first_hash={})
 
 ~MerkleTreeHistory ()
 
void deserialise (const std::vector< uint8_t > &serialised)
 
void append (const ccf::crypto::Sha256Hash &hash)
 
ccf::crypto::Sha256Hash get_root () const
 
void operator= (const MerkleTreeHistory &rhs)
 
void flush (uint64_t index)
 
void retract (uint64_t index)
 
Proof get_proof (uint64_t index)
 
bool verify (const Proof &r)
 
std::vector< uint8_t > serialise ()
 
std::vector< uint8_t > serialise (size_t from, size_t to)
 
uint64_t begin_index ()
 
uint64_t end_index ()
 
bool in_range (uint64_t index)
 
ccf::crypto::Sha256Hash get_leaf (uint64_t index)
 

Constructor & Destructor Documentation

◆ MerkleTreeHistory() [1/3]

ccf::MerkleTreeHistory::MerkleTreeHistory ( MerkleTreeHistory const &  )
delete

◆ MerkleTreeHistory() [2/3]

ccf::MerkleTreeHistory::MerkleTreeHistory ( const std::vector< uint8_t > &  serialised)
inline

◆ MerkleTreeHistory() [3/3]

ccf::MerkleTreeHistory::MerkleTreeHistory ( ccf::crypto::Sha256Hash  first_hash = {})
inline

◆ ~MerkleTreeHistory()

ccf::MerkleTreeHistory::~MerkleTreeHistory ( )
inline

Member Function Documentation

◆ append()

void ccf::MerkleTreeHistory::append ( const ccf::crypto::Sha256Hash hash)
inline

◆ begin_index()

uint64_t ccf::MerkleTreeHistory::begin_index ( )
inline

◆ deserialise()

void ccf::MerkleTreeHistory::deserialise ( const std::vector< uint8_t > &  serialised)
inline

◆ end_index()

uint64_t ccf::MerkleTreeHistory::end_index ( )
inline

◆ flush()

void ccf::MerkleTreeHistory::flush ( uint64_t  index)
inline

◆ get_leaf()

ccf::crypto::Sha256Hash ccf::MerkleTreeHistory::get_leaf ( uint64_t  index)
inline

◆ get_proof()

Proof ccf::MerkleTreeHistory::get_proof ( uint64_t  index)
inline

◆ get_root()

ccf::crypto::Sha256Hash ccf::MerkleTreeHistory::get_root ( ) const
inline

◆ in_range()

bool ccf::MerkleTreeHistory::in_range ( uint64_t  index)
inline

◆ operator=()

void ccf::MerkleTreeHistory::operator= ( const MerkleTreeHistory rhs)
inline

◆ retract()

void ccf::MerkleTreeHistory::retract ( uint64_t  index)
inline

◆ serialise() [1/2]

std::vector< uint8_t > ccf::MerkleTreeHistory::serialise ( )
inline

◆ serialise() [2/2]

std::vector< uint8_t > ccf::MerkleTreeHistory::serialise ( size_t  from,
size_t  to 
)
inline

◆ verify()

bool ccf::MerkleTreeHistory::verify ( const Proof r)
inline

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