Bitcoin ABC  0.22.12
P2P Digital Currency
coinstats.h
Go to the documentation of this file.
1 // Copyright (c) 2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2019 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_NODE_COINSTATS_H
7 #define BITCOIN_NODE_COINSTATS_H
8 
9 #include <amount.h>
10 #include <primitives/blockhash.h>
11 #include <uint256.h>
12 
13 #include <cstdint>
14 #include <functional>
15 
16 class CCoinsView;
17 
18 struct CCoinsStats {
19  int nHeight{0};
21  uint64_t nTransactions{0};
22  uint64_t nTransactionOutputs{0};
23  uint64_t nBogoSize{0};
25  uint64_t nDiskSize{0};
27 
29  uint64_t coins_count{0};
30 };
31 
33 bool GetUTXOStats(CCoinsView *view, CCoinsStats &stats,
34  const std::function<void()> &interruption_point = {});
35 
36 #endif // BITCOIN_NODE_COINSTATS_H
uint64_t nTransactionOutputs
Definition: coinstats.h:22
static constexpr Amount zero()
Definition: amount.h:35
int nHeight
Definition: coinstats.h:19
Definition: amount.h:17
uint64_t nTransactions
Definition: coinstats.h:21
uint64_t nDiskSize
Definition: coinstats.h:25
uint64_t nBogoSize
Definition: coinstats.h:23
uint256 hashSerialized
Definition: coinstats.h:24
Abstract view on the open txout dataset.
Definition: coins.h:148
uint64_t coins_count
The number of coins contained.
Definition: coinstats.h:29
256-bit opaque blob.
Definition: uint256.h:120
A BlockHash is a unqiue identifier for a block.
Definition: blockhash.h:13
bool GetUTXOStats(CCoinsView *view, CCoinsStats &stats, const std::function< void()> &interruption_point={})
Calculate statistics about the unspent transaction output set.
Definition: coinstats.cpp:39
BlockHash hashBlock
Definition: coinstats.h:20
Amount nTotalAmount
Definition: coinstats.h:26