25 BlockStats(
const PeriodData& block,
const std::vector<gas_t>& trxs_gas_used, uint64_t dpos_vote_count,
26 uint32_t committee_size,
const bool aspen_dag_rewards =
false);
78 bool addVote(
const std::shared_ptr<PbftVote>& vote);
Definition: block_stats.hpp:14
bool addVote(const std::shared_ptr< PbftVote > &vote)
In case unique vote is provided, author's votes weight is updated. If provided vote was already proce...
Definition: block_stats.cpp:45
bool addTransaction(const trx_hash_t &trx_hash, const addr_t &validator)
In case unique trx_hash is provided, it is mapped to it's validator's address + validator's unique tr...
Definition: block_stats.cpp:31
addr_t block_author_
Definition: block_stats.hpp:94
void initFeeByTrxHash(const SharedTransactions &transactions, const std::vector< gas_t > &trxs_gas_used)
Prepare fee_by_trx_hash_ map with trx fee by trx hash.
Definition: block_stats.cpp:17
uint64_t total_votes_weight_
Definition: block_stats.hpp:106
void processDagBlocks(const PeriodData &block)
Process Dag blocks and save stats in class for future serialization. returns.
Definition: block_stats.cpp:86
uint32_t dag_blocks_count_
Definition: block_stats.hpp:83
void processStats(const PeriodData &block, const bool aspen_dag_rewards)
Process PeriodData and save stats in class for future serialization. returns.
Definition: block_stats.cpp:70
std::unordered_map< addr_t, ValidatorStats > validators_stats_
Definition: block_stats.hpp:100
uint64_t vote_weight_
Definition: block_stats.hpp:86
u256 fees_rewards_
Definition: block_stats.hpp:88
uint64_t max_votes_weight_
Definition: block_stats.hpp:109
void processDagBlocksAspen(const PeriodData &block)
Process Dag blocks and save stats in class for future serialization with aspen HF changes....
Definition: block_stats.cpp:110
std::unordered_map< trx_hash_t, u256 > fee_by_trx_hash_
Definition: block_stats.hpp:97
uint32_t total_dag_blocks_count_
Definition: block_stats.hpp:103
Definition: block_stats.hpp:81
#define HAS_RLP_FIELDS
Definition: encoding_rlp.hpp:208
PeriodData class is for block execution, that includes PBFT block, certify votes, DAG blocks,...
Definition: period_data.hpp:25
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void > > u256
Definition: Common.h:98
Definition: block_stats.hpp:8
std::vector< SharedTransaction > SharedTransactions
Definition: transaction.hpp:81