|
veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
|
Fully in-memory chain representation. More...
Every chain has exactly one block at every height.
| Block |
#include <chain.hpp>
Inheritance diagram for altintegration::Chain< BlockIndexT >:
Collaboration diagram for altintegration::Chain< BlockIndexT >:Public Types | |
| using | index_t = BlockIndexT |
| using | block_t = typename index_t::block_t |
| using | hash_t = typename index_t::hash_t |
| using | height_t = typename block_t::height_t |
| using | storage_t = std::vector< index_t * > |
| using | iterator_t = typename storage_t::iterator |
| using | const_iterator_t = typename storage_t::const_iterator |
| using | reverse_iterator_t = typename storage_t::reverse_iterator |
| using | const_reverse_iterator_t = typename storage_t::const_reverse_iterator |
Public Member Functions | |
| Chain (height_t startHeight) | |
| Chain (height_t startHeight, index_t *tip) | |
| height_t | getStartHeight () const |
| height_t | firstHeight () const |
| bool | contains (const index_t *index) const |
| index_t * | operator[] (height_t height) const |
| index_t * | next (const index_t *index) const |
| height_t | chainHeight () const |
| bool | empty () const |
| size_t | size () const |
| size_t | blocksCount () const |
| index_t * | tip () const |
| index_t * | first () const |
| reverse_iterator_t | rbegin () |
| const_reverse_iterator_t | rbegin () const |
| reverse_iterator_t | rend () |
| const_reverse_iterator_t | rend () const |
| iterator_t | begin () |
| const_iterator_t | begin () const |
| iterator_t | end () |
| const_iterator_t | end () const |
| void | prependRoot (index_t *index) |
| void | setTip (index_t *index) |
| void | disconnectTip () |
Friends | |
| bool | operator== (const Chain &a, const Chain &b) |
| bool | operator!= (const Chain &a, const Chain &b) |
| using altintegration::Chain< BlockIndexT >::block_t = typename index_t::block_t |
| using altintegration::Chain< BlockIndexT >::const_iterator_t = typename storage_t::const_iterator |
| using altintegration::Chain< BlockIndexT >::const_reverse_iterator_t = typename storage_t::const_reverse_iterator |
| using altintegration::Chain< BlockIndexT >::hash_t = typename index_t::hash_t |
| using altintegration::Chain< BlockIndexT >::height_t = typename block_t::height_t |
| using altintegration::Chain< BlockIndexT >::index_t = BlockIndexT |
| using altintegration::Chain< BlockIndexT >::iterator_t = typename storage_t::iterator |
| using altintegration::Chain< BlockIndexT >::reverse_iterator_t = typename storage_t::reverse_iterator |
| using altintegration::Chain< BlockIndexT >::storage_t = std::vector<index_t*> |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 94 of file chain.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 102 of file chain.hpp.
|
inline |
|
inline |