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 
18 {
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, const std::function<void()>& interruption_point = {});
34 
35 #endif // BITCOIN_NODE_COINSTATS_H
uint64_t nTransactionOutputs
Definition: coinstats.h:22
uint256 hashBlock
Definition: coinstats.h:20
int nHeight
Definition: coinstats.h:19
uint64_t nTransactions
Definition: coinstats.h:21
uint64_t nDiskSize
Definition: coinstats.h:25
uint64_t nBogoSize
Definition: coinstats.h:23
CAmount nTotalAmount
Definition: coinstats.h:26
uint256 hashSerialized
Definition: coinstats.h:24
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
Abstract view on the open txout dataset.
Definition: coins.h:180
uint64_t coins_count
The number of coins contained.
Definition: coinstats.h:29
256-bit opaque blob.
Definition: uint256.h:120
bool GetUTXOStats(CCoinsView *view, CCoinsStats &stats, const std::function< void()> &interruption_point={})
Calculate statistics about the unspent transaction output set.
Definition: coinstats.cpp:36