Bitcoin Core
21.99.0
P2P Digital Currency
src
node
coinstats.h
Go to the documentation of this file.
1
// Copyright (c) 2010 Satoshi Nakamoto
2
// Copyright (c) 2009-2020 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
{
18
HASH_SERIALIZED
,
19
NONE
,
20
};
21
22
struct
CCoinsStats
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
nHeight
unsigned int nHeight
Definition:
mempool_eviction.cpp:14
CCoinsStats
Definition:
coinstats.h:22
CAmount
int64_t CAmount
Amount in satoshis (Can be negative)
Definition:
amount.h:12
CoinStatsHashType
CoinStatsHashType
Definition:
coinstats.h:17
CCoinsView
Abstract view on the open txout dataset.
Definition:
coins.h:153
CoinStatsHashType::HASH_SERIALIZED
uint256
256-bit opaque blob.
Definition:
uint256.h:124
uint256.h
amount.h
CoinStatsHashType::NONE
GetUTXOStats
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
Generated on Sat Jan 23 2021 20:03:13 for Bitcoin Core by
1.8.13