PIVX Core  5.6.99
P2P Digital Currency
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
libzcash::IncrementalMerkleTree< Depth, Hash > Class Template Reference

#include <incrementalmerkletree.h>

Public Member Functions

 BOOST_STATIC_ASSERT (Depth >=1)
 
 IncrementalMerkleTree ()
 
size_t DynamicMemoryUsage () const
 
size_t size () const
 
void append (Hash obj)
 
Hash root () const
 
Hash last () const
 
IncrementalWitness< Depth, Hashwitness () const
 
 SERIALIZE_METHODS (IncrementalMerkleTree, obj)
 

Static Public Member Functions

static Hash empty_root ()
 

Private Member Functions

MerklePath path (std::deque< Hash > filler_hashes=std::deque< Hash >()) const
 
Hash root (size_t depth, std::deque< Hash > filler_hashes=std::deque< Hash >()) const
 
bool is_complete (size_t depth=Depth) const
 
size_t next_depth (size_t skip) const
 
void wfcheck () const
 

Private Attributes

Optional< Hashleft
 
Optional< Hashright
 
std::vector< Optional< Hash > > parents
 

Static Private Attributes

static EmptyMerkleRoots< Depth, Hashemptyroots
 

Friends

class IncrementalWitness< Depth, Hash >
 
template<size_t D, typename H >
bool operator== (const IncrementalMerkleTree< D, H > &a, const IncrementalMerkleTree< D, H > &b)
 

Detailed Description

template<size_t Depth, typename Hash>
class libzcash::IncrementalMerkleTree< Depth, Hash >

Definition at line 88 of file incrementalmerkletree.h.

Constructor & Destructor Documentation

◆ IncrementalMerkleTree()

template<size_t Depth, typename Hash >
libzcash::IncrementalMerkleTree< Depth, Hash >::IncrementalMerkleTree ( )
inline

Definition at line 95 of file incrementalmerkletree.h.

Member Function Documentation

◆ append()

template<size_t Depth, typename Hash >
void libzcash::IncrementalMerkleTree< Depth, Hash >::append ( Hash  obj)

Definition at line 923 of file incrementalmerkletree.cpp.

Here is the caller graph for this function:

◆ BOOST_STATIC_ASSERT()

template<size_t Depth, typename Hash >
libzcash::IncrementalMerkleTree< Depth, Hash >::BOOST_STATIC_ASSERT ( Depth >=  1)

◆ DynamicMemoryUsage()

template<size_t Depth, typename Hash >
size_t libzcash::IncrementalMerkleTree< Depth, Hash >::DynamicMemoryUsage ( ) const
inline

Definition at line 97 of file incrementalmerkletree.h.

◆ empty_root()

template<size_t Depth, typename Hash >
static Hash libzcash::IncrementalMerkleTree< Depth, Hash >::empty_root ( )
inlinestatic

Definition at line 121 of file incrementalmerkletree.h.

◆ is_complete()

template<size_t Depth, typename Hash >
bool libzcash::IncrementalMerkleTree< Depth, Hash >::is_complete ( size_t  depth = Depth) const
private

Definition at line 963 of file incrementalmerkletree.cpp.

◆ last()

template<size_t Depth, typename Hash >
Hash libzcash::IncrementalMerkleTree< Depth, Hash >::last

Definition at line 893 of file incrementalmerkletree.cpp.

◆ next_depth()

template<size_t Depth, typename Hash >
size_t libzcash::IncrementalMerkleTree< Depth, Hash >::next_depth ( size_t  skip) const
private

Definition at line 984 of file incrementalmerkletree.cpp.

◆ path()

template<size_t Depth, typename Hash >
MerklePath libzcash::IncrementalMerkleTree< Depth, Hash >::path ( std::deque< Hash filler_hashes = std::deque<Hash>()) const
private

Definition at line 1054 of file incrementalmerkletree.cpp.

Here is the call graph for this function:

◆ root() [1/2]

template<size_t Depth, typename Hash >
Hash libzcash::IncrementalMerkleTree< Depth, Hash >::root ( ) const
inline

Definition at line 106 of file incrementalmerkletree.h.

Here is the caller graph for this function:

◆ root() [2/2]

template<size_t Depth, typename Hash >
Hash libzcash::IncrementalMerkleTree< Depth, Hash >::root ( size_t  depth,
std::deque< Hash filler_hashes = std::deque<Hash>() 
) const
private

Definition at line 1020 of file incrementalmerkletree.cpp.

Here is the call graph for this function:

◆ SERIALIZE_METHODS()

template<size_t Depth, typename Hash >
libzcash::IncrementalMerkleTree< Depth, Hash >::SERIALIZE_METHODS ( IncrementalMerkleTree< Depth, Hash ,
obj   
)
inline

Definition at line 115 of file incrementalmerkletree.h.

◆ size()

template<size_t Depth, typename Hash >
size_t libzcash::IncrementalMerkleTree< Depth, Hash >::size

Definition at line 904 of file incrementalmerkletree.cpp.

◆ wfcheck()

template<size_t Depth, typename Hash >
void libzcash::IncrementalMerkleTree< Depth, Hash >::wfcheck
private

Definition at line 871 of file incrementalmerkletree.cpp.

◆ witness()

template<size_t Depth, typename Hash >
IncrementalWitness<Depth, Hash> libzcash::IncrementalMerkleTree< Depth, Hash >::witness ( ) const
inline

Definition at line 111 of file incrementalmerkletree.h.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ IncrementalWitness< Depth, Hash >

template<size_t Depth, typename Hash >
friend class IncrementalWitness< Depth, Hash >
friend

Definition at line 75 of file incrementalmerkletree.h.

◆ operator==

template<size_t Depth, typename Hash >
template<size_t D, typename H >
bool operator== ( const IncrementalMerkleTree< D, H > &  a,
const IncrementalMerkleTree< D, H > &  b 
)
friend

Member Data Documentation

◆ emptyroots

template<size_t Depth, typename Hash >
EmptyMerkleRoots< Depth, Hash > libzcash::IncrementalMerkleTree< Depth, Hash >::emptyroots
staticprivate

Definition at line 130 of file incrementalmerkletree.h.

◆ left

template<size_t Depth, typename Hash >
Optional<Hash> libzcash::IncrementalMerkleTree< Depth, Hash >::left
private

Definition at line 131 of file incrementalmerkletree.h.

◆ parents

template<size_t Depth, typename Hash >
std::vector<Optional<Hash> > libzcash::IncrementalMerkleTree< Depth, Hash >::parents
private

Definition at line 135 of file incrementalmerkletree.h.

◆ right

template<size_t Depth, typename Hash >
Optional<Hash> libzcash::IncrementalMerkleTree< Depth, Hash >::right
private

Definition at line 132 of file incrementalmerkletree.h.


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