BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
Functions
blockchain.h File Reference
#include <vector>
#include <stdint.h>
#include <amount.h>
Include dependency graph for blockchain.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double GetDifficulty (const CBlockIndex *blockindex)
 Get the difficulty of the net wrt to the given block index. More...
 
void RPCNotifyBlockChange (bool ibd, const CBlockIndex *)
 Callback for when block tip changed. More...
 
UniValue blockToJSON (const CBlock &block, const CBlockIndex *blockindex, bool txDetails=false)
 Block description to JSON. More...
 
UniValue mempoolInfoToJSON ()
 Mempool information to JSON. More...
 
UniValue mempoolToJSON (bool fVerbose=false)
 Mempool to JSON. More...
 
UniValue blockheaderToJSON (const CBlockIndex *blockindex)
 Block header to JSON. More...
 
void CalculatePercentilesByWeight (CAmount result[NUM_GETBLOCKSTATS_PERCENTILES], std::vector< std::pair< CAmount, int64_t >> &scores, int64_t total_weight)
 Used by getblockstats to get feerates at different percentiles by weight. More...
 

Function Documentation

◆ blockheaderToJSON()

UniValue blockheaderToJSON ( const CBlockIndex blockindex)

Block header to JSON.

Definition at line 88 of file blockchain.cpp.

Here is the call graph for this function:

◆ blockToJSON()

UniValue blockToJSON ( const CBlock block,
const CBlockIndex blockindex,
bool  txDetails = false 
)

Block description to JSON.

Definition at line 118 of file blockchain.cpp.

Here is the call graph for this function:

◆ CalculatePercentilesByWeight()

void CalculatePercentilesByWeight ( CAmount  result[NUM_GETBLOCKSTATS_PERCENTILES],
std::vector< std::pair< CAmount, int64_t >> &  scores,
int64_t  total_weight 
)

Used by getblockstats to get feerates at different percentiles by weight.

Definition at line 1662 of file blockchain.cpp.

◆ GetDifficulty()

double GetDifficulty ( const CBlockIndex blockindex)

Get the difficulty of the net wrt to the given block index.

Returns
A floating point number that is a multiple of the main net minimum difficulty (4295032833 hashes).

Definition at line 60 of file blockchain.cpp.

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

◆ mempoolInfoToJSON()

UniValue mempoolInfoToJSON ( )

Mempool information to JSON.

Definition at line 1423 of file blockchain.cpp.

Here is the call graph for this function:

◆ mempoolToJSON()

UniValue mempoolToJSON ( bool  fVerbose = false)

Mempool to JSON.

Definition at line 451 of file blockchain.cpp.

Here is the call graph for this function:

◆ RPCNotifyBlockChange()

void RPCNotifyBlockChange ( bool  ibd,
const CBlockIndex  
)

Callback for when block tip changed.

Definition at line 198 of file blockchain.cpp.