Electroneum
Public Member Functions | Private Attributes | List of all members
tools::hashchain Class Reference

#include <wallet2.h>

Collaboration diagram for tools::hashchain:
Collaboration graph
[legend]

Public Member Functions

 hashchain ()
 
size_t size () const
 
size_t offset () const
 
const crypto::hashgenesis () const
 
void push_back (const crypto::hash &hash)
 
bool is_in_bounds (size_t idx) const
 
const crypto::hashoperator[] (size_t idx) const
 
crypto::hashoperator[] (size_t idx)
 
void crop (size_t height)
 
void clear ()
 
bool empty () const
 
void trim (size_t height)
 
void refill (const crypto::hash &hash)
 
template<class t_archive >
void serialize (t_archive &a, const unsigned int ver)
 

Private Attributes

size_t m_offset
 
crypto::hash m_genesis
 
std::deque< crypto::hashm_blockchain
 

Constructor & Destructor Documentation

◆ hashchain()

tools::hashchain::hashchain ( )
inline

Member Function Documentation

◆ clear()

void tools::hashchain::clear ( )
inline

◆ crop()

void tools::hashchain::crop ( size_t  height)
inline

◆ empty()

bool tools::hashchain::empty ( ) const
inline

◆ genesis()

const crypto::hash& tools::hashchain::genesis ( ) const
inline

◆ is_in_bounds()

bool tools::hashchain::is_in_bounds ( size_t  idx) const
inline

◆ offset()

size_t tools::hashchain::offset ( ) const
inline

◆ operator[]() [1/2]

crypto::hash& tools::hashchain::operator[] ( size_t  idx)
inline

◆ operator[]() [2/2]

const crypto::hash& tools::hashchain::operator[] ( size_t  idx) const
inline

◆ push_back()

void tools::hashchain::push_back ( const crypto::hash hash)
inline

◆ refill()

void tools::hashchain::refill ( const crypto::hash hash)
inline

◆ serialize()

template<class t_archive >
void tools::hashchain::serialize ( t_archive &  a,
const unsigned int  ver 
)
inline

◆ size()

size_t tools::hashchain::size ( ) const
inline

◆ trim()

void tools::hashchain::trim ( size_t  height)
inline

Member Data Documentation

◆ m_blockchain

std::deque<crypto::hash> tools::hashchain::m_blockchain
private

◆ m_genesis

crypto::hash tools::hashchain::m_genesis
private

◆ m_offset

size_t tools::hashchain::m_offset
private

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