Changeset View
Changeset View
Standalone View
Standalone View
src/node/coinstats.h
Show All 33 Lines | struct CCoinsStats { | ||||
uint64_t nBogoSize{0}; | uint64_t nBogoSize{0}; | ||||
uint256 hashSerialized{}; | uint256 hashSerialized{}; | ||||
uint64_t nDiskSize{0}; | uint64_t nDiskSize{0}; | ||||
Amount nTotalAmount{Amount::zero()}; | Amount nTotalAmount{Amount::zero()}; | ||||
//! The number of coins contained. | //! The number of coins contained. | ||||
uint64_t coins_count{0}; | uint64_t coins_count{0}; | ||||
bool from_index{false}; | |||||
CCoinsStats(CoinStatsHashType hash_type) : m_hash_type(hash_type) {} | CCoinsStats(CoinStatsHashType hash_type) : m_hash_type(hash_type) {} | ||||
}; | }; | ||||
//! Calculate statistics about the unspent transaction output set | //! Calculate statistics about the unspent transaction output set | ||||
bool GetUTXOStats(CCoinsView *view, BlockManager &blockman, CCoinsStats &stats, | bool GetUTXOStats(CCoinsView *view, BlockManager &blockman, CCoinsStats &stats, | ||||
const std::function<void()> &interruption_point = {}); | const std::function<void()> &interruption_point = {}, | ||||
const CBlockIndex *pindex = nullptr); | |||||
uint64_t GetBogoSize(const CScript &script_pub_key); | uint64_t GetBogoSize(const CScript &script_pub_key); | ||||
CDataStream TxOutSer(const COutPoint &outpoint, const Coin &coin); | CDataStream TxOutSer(const COutPoint &outpoint, const Coin &coin); | ||||
#endif // BITCOIN_NODE_COINSTATS_H | #endif // BITCOIN_NODE_COINSTATS_H |