5 #ifndef BITCOIN_RPC_BLOCKCHAIN_H 6 #define BITCOIN_RPC_BLOCKCHAIN_H 16 static constexpr
int NUM_GETBLOCKSTATS_PERCENTILES = 5;
void RPCNotifyBlockChange(bool ibd, const CBlockIndex *)
Callback for when block tip changed.
UniValue mempoolInfoToJSON()
Mempool information to JSON.
double GetDifficulty(const CBlockIndex *blockindex)
Get the difficulty of the net wrt to the given block index.
int64_t CAmount
Amount in satoshis (Can be negative)
UniValue mempoolToJSON(bool fVerbose=false)
Mempool to JSON.
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.
The block chain is a tree shaped structure starting with the genesis block at the root...
UniValue blockheaderToJSON(const CBlockIndex *blockindex)
Block header to JSON.
UniValue blockToJSON(const CBlock &block, const CBlockIndex *blockindex, bool txDetails=false)
Block description to JSON.