PIVX Core  5.6.99
P2P Digital Currency
Classes | Functions
blockchain.cpp File Reference
#include "budget/budgetmanager.h"
#include "chainparams.h"
#include "checkpoints.h"
#include "clientversion.h"
#include "consensus/upgrades.h"
#include "core_io.h"
#include "hash.h"
#include "kernel.h"
#include "key_io.h"
#include "llmq/quorums_chainlocks.h"
#include "masternodeman.h"
#include "policy/feerate.h"
#include "policy/policy.h"
#include "rpc/server.h"
#include "script/descriptor.h"
#include "sync.h"
#include "txdb.h"
#include "util/system.h"
#include "utilmoneystr.h"
#include "utilstrencodings.h"
#include "validation.h"
#include "validationinterface.h"
#include "wallet/wallet.h"
#include "warnings.h"
#include <stdint.h>
#include <univalue.h>
#include <numeric>
#include <condition_variable>
#include <boost/thread/thread.hpp>
Include dependency graph for blockchain.cpp:

Go to the source code of this file.

Classes

struct  CUpdatedBlock
 
struct  CCoinsStats
 
struct  CompareBlocksByHeight
 Comparison function for sorting the getchaintips heads. More...
 
class  CoinsViewScanReserver
 

Functions

void TxToJSON (CWallet *const pwallet, const CTransaction &tx, const CBlockIndex *tip, const CBlockIndex *blockindex, UniValue &entry)
 
UniValue syncwithvalidationinterfacequeue (const JSONRPCRequest &request)
 
double GetDifficulty (const CBlockIndex *blockindex)
 
int ComputeNextBlockAndDepth (const CBlockIndex *tip, const CBlockIndex *blockindex, const CBlockIndex *&next)
 
UniValue blockheaderToJSON (const CBlockIndex *tip, const CBlockIndex *blockindex)
 
UniValue blockToJSON (const CBlock &block, const CBlockIndex *tip, const CBlockIndex *blockindex, bool txDetails=false)
 
UniValue getblockcount (const JSONRPCRequest &request)
 
UniValue getbestblockhash (const JSONRPCRequest &request)
 
UniValue getbestsaplinganchor (const JSONRPCRequest &request)
 
UniValue getbestchainlock (const JSONRPCRequest &request)
 
void RPCNotifyBlockChange (bool fInitialDownload, const CBlockIndex *pindex)
 
UniValue waitfornewblock (const JSONRPCRequest &request)
 
UniValue waitforblock (const JSONRPCRequest &request)
 
UniValue waitforblockheight (const JSONRPCRequest &request)
 
UniValue getdifficulty (const JSONRPCRequest &request)
 
UniValue mempoolToJSON (bool fVerbose=false)
 
UniValue getrawmempool (const JSONRPCRequest &request)
 
UniValue getblockhash (const JSONRPCRequest &request)
 
UniValue getblock (const JSONRPCRequest &request)
 
UniValue getblockheader (const JSONRPCRequest &request)
 
UniValue getsupplyinfo (const JSONRPCRequest &request)
 getinfo depends on getsupplyinfo defined in rpc/blockchain.cpp More...
 
UniValue gettxoutsetinfo (const JSONRPCRequest &request)
 
UniValue gettxout (const JSONRPCRequest &request)
 
UniValue verifychain (const JSONRPCRequest &request)
 
void NetworkUpgradeDescPushBack (UniValue &networkUpgrades, const Consensus::Params &consensusParams, Consensus::UpgradeIndex idx, int height)
 
UniValue getblockchaininfo (const JSONRPCRequest &request)
 
UniValue getchaintips (const JSONRPCRequest &request)
 
UniValue mempoolInfoToJSON ()
 
UniValue getmempoolinfo (const JSONRPCRequest &request)
 
UniValue invalidateblock (const JSONRPCRequest &request)
 
UniValue reconsiderblock (const JSONRPCRequest &request)
 
void validaterange (const UniValue &params, int &heightStart, int &heightEnd, int minHeightStart=1)
 
UniValue getblockindexstats (const JSONRPCRequest &request)
 
UniValue getfeeinfo (const JSONRPCRequest &request)
 
bool FindScriptPubKey (std::atomic< int > &scan_progress, const std::atomic< bool > &should_abort, int64_t &count, CCoinsViewCursor *cursor, const std::set< CScript > &needles, std::map< COutPoint, Coin > &out_results)
 Search for a given set of pubkey scripts. More...
 
UniValue scantxoutset (const JSONRPCRequest &request)
 
void RegisterBlockchainRPCCommands (CRPCTable &tableRPC)
 Register block chain RPC commands. More...
 

Function Documentation

◆ blockheaderToJSON()

UniValue blockheaderToJSON ( const CBlockIndex tip,
const CBlockIndex blockindex 
)

Definition at line 116 of file blockchain.cpp.

Here is the call graph for this function:

◆ blockToJSON()

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

Definition at line 143 of file blockchain.cpp.

Here is the call graph for this function:

◆ ComputeNextBlockAndDepth()

int ComputeNextBlockAndDepth ( const CBlockIndex tip,
const CBlockIndex blockindex,
const CBlockIndex *&  next 
)

Definition at line 106 of file blockchain.cpp.

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

◆ FindScriptPubKey()

bool FindScriptPubKey ( std::atomic< int > &  scan_progress,
const std::atomic< bool > &  should_abort,
int64_t &  count,
CCoinsViewCursor cursor,
const std::set< CScript > &  needles,
std::map< COutPoint, Coin > &  out_results 
)

Search for a given set of pubkey scripts.

Definition at line 1504 of file blockchain.cpp.

◆ getbestblockhash()

UniValue getbestblockhash ( const JSONRPCRequest request)

Definition at line 215 of file blockchain.cpp.

Here is the call graph for this function:

◆ getbestchainlock()

UniValue getbestchainlock ( const JSONRPCRequest request)

Definition at line 248 of file blockchain.cpp.

Here is the call graph for this function:

◆ getbestsaplinganchor()

UniValue getbestsaplinganchor ( const JSONRPCRequest request)

Definition at line 232 of file blockchain.cpp.

Here is the call graph for this function:

◆ getblock()

UniValue getblock ( const JSONRPCRequest request)

Definition at line 558 of file blockchain.cpp.

Here is the call graph for this function:

◆ getblockchaininfo()

UniValue getblockchaininfo ( const JSONRPCRequest request)

Definition at line 1027 of file blockchain.cpp.

Here is the call graph for this function:

◆ getblockcount()

UniValue getblockcount ( const JSONRPCRequest request)

Definition at line 198 of file blockchain.cpp.

Here is the call graph for this function:

◆ getblockhash()

UniValue getblockhash ( const JSONRPCRequest request)

Definition at line 532 of file blockchain.cpp.

Here is the call graph for this function:

◆ getblockheader()

UniValue getblockheader ( const JSONRPCRequest request)

Definition at line 642 of file blockchain.cpp.

Here is the call graph for this function:

◆ getblockindexstats()

UniValue getblockindexstats ( const JSONRPCRequest request)

Definition at line 1362 of file blockchain.cpp.

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

◆ getchaintips()

UniValue getchaintips ( const JSONRPCRequest request)

Definition at line 1112 of file blockchain.cpp.

Here is the call graph for this function:

◆ GetDifficulty()

double GetDifficulty ( const CBlockIndex blockindex)

Definition at line 67 of file blockchain.cpp.

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

◆ getdifficulty()

UniValue getdifficulty ( const JSONRPCRequest request)

Definition at line 415 of file blockchain.cpp.

Here is the call graph for this function:

◆ getfeeinfo()

UniValue getfeeinfo ( const JSONRPCRequest request)

Definition at line 1462 of file blockchain.cpp.

Here is the call graph for this function:

◆ getmempoolinfo()

UniValue getmempoolinfo ( const JSONRPCRequest request)

Definition at line 1216 of file blockchain.cpp.

Here is the call graph for this function:

◆ getrawmempool()

UniValue getrawmempool ( const JSONRPCRequest request)

Definition at line 498 of file blockchain.cpp.

Here is the call graph for this function:

◆ getsupplyinfo()

UniValue getsupplyinfo ( const JSONRPCRequest request)

getinfo depends on getsupplyinfo defined in rpc/blockchain.cpp

Definition at line 701 of file blockchain.cpp.

Here is the call graph for this function:

◆ gettxout()

UniValue gettxout ( const JSONRPCRequest request)
Todo:
: filtering spent coins should be done by the CCoinsViewMemPool

Definition at line 852 of file blockchain.cpp.

Here is the call graph for this function:

◆ gettxoutsetinfo()

UniValue gettxoutsetinfo ( const JSONRPCRequest request)

Definition at line 814 of file blockchain.cpp.

Here is the call graph for this function:

◆ invalidateblock()

UniValue invalidateblock ( const JSONRPCRequest request)

Definition at line 1240 of file blockchain.cpp.

Here is the call graph for this function:

◆ mempoolInfoToJSON()

UniValue mempoolInfoToJSON ( )

Definition at line 1202 of file blockchain.cpp.

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

◆ mempoolToJSON()

UniValue mempoolToJSON ( bool  fVerbose = false)

Definition at line 474 of file blockchain.cpp.

Here is the call graph for this function:

◆ NetworkUpgradeDescPushBack()

void NetworkUpgradeDescPushBack ( UniValue networkUpgrades,
const Consensus::Params consensusParams,
Consensus::UpgradeIndex  idx,
int  height 
)

Definition at line 1011 of file blockchain.cpp.

Here is the call graph for this function:

◆ reconsiderblock()

UniValue reconsiderblock ( const JSONRPCRequest request)

Definition at line 1289 of file blockchain.cpp.

Here is the call graph for this function:

◆ RegisterBlockchainRPCCommands()

void RegisterBlockchainRPCCommands ( CRPCTable tableRPC)

Register block chain RPC commands.

Definition at line 1748 of file blockchain.cpp.

◆ RPCNotifyBlockChange()

void RPCNotifyBlockChange ( bool  fInitialDownload,
const CBlockIndex pindex 
)

Definition at line 274 of file blockchain.cpp.

Here is the caller graph for this function:

◆ scantxoutset()

UniValue scantxoutset ( const JSONRPCRequest request)

Definition at line 1563 of file blockchain.cpp.

Here is the call graph for this function:

◆ syncwithvalidationinterfacequeue()

UniValue syncwithvalidationinterfacequeue ( const JSONRPCRequest request)

Definition at line 52 of file blockchain.cpp.

Here is the call graph for this function:

◆ TxToJSON()

void TxToJSON ( CWallet *const  pwallet,
const CTransaction tx,
const CBlockIndex tip,
const CBlockIndex blockindex,
UniValue entry 
)

Definition at line 81 of file rawtransaction.cpp.

Here is the caller graph for this function:

◆ validaterange()

void validaterange ( const UniValue params,
int &  heightStart,
int &  heightEnd,
int  minHeightStart = 1 
)

Definition at line 1329 of file blockchain.cpp.

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

◆ verifychain()

UniValue verifychain ( const JSONRPCRequest request)

Definition at line 930 of file blockchain.cpp.

Here is the call graph for this function:

◆ waitforblock()

UniValue waitforblock ( const JSONRPCRequest request)

Definition at line 325 of file blockchain.cpp.

Here is the call graph for this function:

◆ waitforblockheight()

UniValue waitforblockheight ( const JSONRPCRequest request)

Definition at line 370 of file blockchain.cpp.

Here is the call graph for this function:

◆ waitfornewblock()

UniValue waitfornewblock ( const JSONRPCRequest request)

Definition at line 284 of file blockchain.cpp.

Here is the call graph for this function: