Bitcoin Core  0.20.99
P2P Digital Currency
Functions
coinstats.cpp File Reference
#include <node/coinstats.h>
#include <coins.h>
#include <hash.h>
#include <serialize.h>
#include <uint256.h>
#include <util/system.h>
#include <validation.h>
#include <map>
Include dependency graph for coinstats.cpp:

Go to the source code of this file.

Functions

static uint64_t GetBogoSize (const CScript &scriptPubKey)
 
static void ApplyStats (CCoinsStats &stats, CHashWriter &ss, const uint256 &hash, const std::map< uint32_t, Coin > &outputs)
 
static void ApplyStats (CCoinsStats &stats, std::nullptr_t, const uint256 &hash, const std::map< uint32_t, Coin > &outputs)
 
template<typename T >
static bool GetUTXOStats (CCoinsView *view, CCoinsStats &stats, T hash_obj, const std::function< void()> &interruption_point)
 Calculate statistics about the unspent transaction output set. More...
 
bool GetUTXOStats (CCoinsView *view, CCoinsStats &stats, CoinStatsHashType hash_type, const std::function< void()> &interruption_point)
 Calculate statistics about the unspent transaction output set. More...
 
static void PrepareHash (CHashWriter &ss, CCoinsStats &stats)
 
static void PrepareHash (std::nullptr_t, CCoinsStats &stats)
 
static void FinalizeHash (CHashWriter &ss, CCoinsStats &stats)
 
static void FinalizeHash (std::nullptr_t, CCoinsStats &stats)
 

Function Documentation

◆ ApplyStats() [1/2]

static void ApplyStats ( CCoinsStats stats,
CHashWriter ss,
const uint256 hash,
const std::map< uint32_t, Coin > &  outputs 
)
static

Definition at line 27 of file coinstats.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ApplyStats() [2/2]

static void ApplyStats ( CCoinsStats stats,
std::nullptr_t  ,
const uint256 hash,
const std::map< uint32_t, Coin > &  outputs 
)
static

Definition at line 44 of file coinstats.cpp.

Here is the call graph for this function:

◆ FinalizeHash() [1/2]

static void FinalizeHash ( CHashWriter ss,
CCoinsStats stats 
)
static

Definition at line 121 of file coinstats.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FinalizeHash() [2/2]

static void FinalizeHash ( std::nullptr_t  ,
CCoinsStats stats 
)
static

Definition at line 125 of file coinstats.cpp.

◆ GetBogoSize()

static uint64_t GetBogoSize ( const CScript scriptPubKey)
static

Definition at line 17 of file coinstats.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetUTXOStats() [1/2]

template<typename T >
static bool GetUTXOStats ( CCoinsView view,
CCoinsStats stats,
hash_obj,
const std::function< void()> &  interruption_point 
)
static

Calculate statistics about the unspent transaction output set.

Definition at line 57 of file coinstats.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetUTXOStats() [2/2]

bool GetUTXOStats ( CCoinsView view,
CCoinsStats stats,
CoinStatsHashType  hash_type,
const std::function< void()> &  interruption_point 
)

Calculate statistics about the unspent transaction output set.

Definition at line 100 of file coinstats.cpp.

Here is the call graph for this function:

◆ PrepareHash() [1/2]

static void PrepareHash ( CHashWriter ss,
CCoinsStats stats 
)
static

Definition at line 115 of file coinstats.cpp.

Here is the caller graph for this function:

◆ PrepareHash() [2/2]

static void PrepareHash ( std::nullptr_t  ,
CCoinsStats stats 
)
static

Definition at line 119 of file coinstats.cpp.