Bitcoin Core  0.20.99
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 <uint256.h>
11 
12 #include <cstdint>
13 #include <functional>
14 
15 class CCoinsView;
16 
17 enum class CoinStatsHashType {
19  NONE,
20 };
21 
23 {
24  int nHeight{0};
25  uint256 hashBlock{};
26  uint64_t nTransactions{0};
27  uint64_t nTransactionOutputs{0};
28  uint64_t nBogoSize{0};
29  uint256 hashSerialized{};
30  uint64_t nDiskSize{0};
31  CAmount nTotalAmount{0};
32 
34  uint64_t coins_count{0};
35 };
36 
38 bool GetUTXOStats(CCoinsView* view, CCoinsStats& stats, const CoinStatsHashType hash_type, const std::function<void()>& interruption_point = {});
39 
40 #endif // BITCOIN_NODE_COINSTATS_H
unsigned int nHeight
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
CoinStatsHashType
Definition: coinstats.h:17
Abstract view on the open txout dataset.
Definition: coins.h:180
256-bit opaque blob.
Definition: uint256.h:124
bool GetUTXOStats(CCoinsView *view, CCoinsStats &stats, const CoinStatsHashType hash_type, const std::function< void()> &interruption_point={})
Calculate statistics about the unspent transaction output set.
Definition: coinstats.cpp:100