4 #include <shared_mutex>
111 std::shared_ptr<DbStorage>
db_ =
nullptr;
Definition: FixedHash.h:35
blk_hash_t last_pbft_block_hash_
Definition: pbft_chain.hpp:108
bool findPbftBlockInChain(blk_hash_t const &pbft_block_hash)
Find a PBFT block in chain.
Definition: pbft_chain.cpp:72
PbftPeriod non_empty_size_
Definition: pbft_chain.hpp:106
bool checkPbftBlockValidation(const std::shared_ptr< PbftBlock > &pbft_block) const
Verify a PBFT block.
Definition: pbft_chain.cpp:95
PbftPeriod getPbftChainSizeExcludingEmptyPbftBlocks() const
Get PBFT chain size excluding empty PBFT blocks.
Definition: pbft_chain.cpp:57
PbftPeriod size_
Definition: pbft_chain.hpp:105
std::shared_ptr< DbStorage > db_
Definition: pbft_chain.hpp:111
PbftPeriod getPbftChainSize() const
Get PBFT chain size.
Definition: pbft_chain.cpp:52
blk_hash_t getHeadHash() const
Get PBFT chain head hash.
Definition: pbft_chain.cpp:47
std::string getJsonStrForBlock(blk_hash_t const &block_hash, bool null_anchor) const
Get PBFT chain head block in JSON string.
Definition: pbft_chain.cpp:122
std::shared_mutex chain_head_access_
Definition: pbft_chain.hpp:102
void updatePbftChain(blk_hash_t const &pbft_block_hash, blk_hash_t const &anchor_hash)
Update PBFT chain size, non empty chain size, and last PBFT block hash.
Definition: pbft_chain.cpp:85
blk_hash_t last_non_null_pbft_dag_anchor_hash_
Definition: pbft_chain.hpp:109
PbftChain(addr_t node_addr, std::shared_ptr< DbStorage > db)
Definition: pbft_chain.cpp:11
blk_hash_t head_hash_
Definition: pbft_chain.hpp:104
PbftBlock getPbftBlockInChain(blk_hash_t const &pbft_block_hash)
Get a PBFT block in chain.
Definition: pbft_chain.cpp:76
blk_hash_t getLastPbftBlockHash() const
Get last PBFT block hash.
Definition: pbft_chain.cpp:62
std::string getJsonStr() const
Get PBFT chain head block in JSON string.
Definition: pbft_chain.cpp:112
blk_hash_t getLastNonNullPbftBlockAnchor() const
Get last non null PBFT block anchor.
Definition: pbft_chain.cpp:67
The PbftBlock class is a PBFT block class that includes PBFT block hash, previous PBFT block hash,...
Definition: pbft_block.hpp:21
PbftChain class is a single linked list that contains finalized PBFT blocks.
Definition: pbft_chain.hpp:25
#define LOG_OBJECTS_DEFINE
Definition: logger.hpp:60
EthBlockNumber PbftPeriod
Definition: types.hpp:24
std::ostream & operator<<(std::ostream &strm, NodeConfig const &conf)
Definition: config.cpp:205