PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Classes | Functions
blockchain.cpp File Reference
#include "checkpoints.h"
#include "main.h"
#include "rpc/server.h"
#include "sync.h"
#include "util.h"
#include "utilmoneystr.h"
#include "base58.h"
#include <stdint.h>
#include <univalue.h>
#include <mutex>
#include <numeric>
#include <condition_variable>
#include "clientversion.h"
Include dependency graph for blockchain.cpp:

Go to the source code of this file.

Classes

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

Functions

void TxToJSON (const CTransaction &tx, const uint256 hashBlock, UniValue &entry)
 
void PoSBlockInfoToJSON (const uint256 hashBlock, int64_t nTime, int height, UniValue &entry)
 
void ScriptPubKeyToJSON (const CScript &scriptPubKey, UniValue &out, bool fIncludeHex)
 
double GetDifficulty (const CBlockIndex *blockindex)
 
UniValue blockheaderToJSON (const CBlockIndex *blockindex)
 
UniValue blockToJSON (const CBlock &block, const CBlockIndex *blockindex, bool txDetails=false)
 
UniValue getsupply (const UniValue &params, bool fHelp)
 
UniValue getmaxsupply (const UniValue &params, bool fHelp)
 
UniValue getblockcount (const UniValue &params, bool fHelp)
 
UniValue getbestblockhash (const UniValue &params, bool fHelp)
 
void RPCNotifyBlockChange (bool fInitialDownload, const CBlockIndex *pindex)
 
UniValue waitfornewblock (const UniValue &params, bool fHelp)
 
UniValue waitforblock (const UniValue &params, bool fHelp)
 
UniValue waitforblockheight (const UniValue &params, bool fHelp)
 
UniValue getdifficulty (const UniValue &params, bool fHelp)
 
UniValue mempoolToJSON (bool fVerbose=false)
 
UniValue getrawmempool (const UniValue &params, bool fHelp)
 
UniValue getblockhash (const UniValue &params, bool fHelp)
 
UniValue getblock (const UniValue &params, bool fHelp)
 
UniValue getblockheader (const UniValue &params, bool fHelp)
 
UniValue gettxoutsetinfo (const UniValue &params, bool fHelp)
 
UniValue gettxout (const UniValue &params, bool fHelp)
 
UniValue verifychain (const UniValue &params, bool fHelp)
 
UniValue getblockchaininfo (const UniValue &params, bool fHelp)
 
UniValue getchaintips (const UniValue &params, bool fHelp)
 
UniValue getfeeinfo (const UniValue &params, bool fHelp)
 
UniValue mempoolInfoToJSON ()
 
UniValue getmempoolinfo (const UniValue &params, bool fHelp)
 
UniValue invalidateblock (const UniValue &params, bool fHelp)
 
UniValue resyncfrom (const UniValue &params, bool fHelp)
 
UniValue reconsiderblock (const UniValue &params, bool fHelp)
 
UniValue getinvalid (const UniValue &params, bool fHelp)
 
UniValue setmaxreorgdepth (const UniValue &params, bool fHelp)
 
UniValue getlastpoablock (const UniValue &params, bool fHelp)
 
UniValue getlastpoablockhash (const UniValue &params, bool fHelp)
 
UniValue getlastpoablockheight (const UniValue &params, bool fHelp)
 
UniValue getlastpoablocktime (const UniValue &params, bool fHelp)
 
UniValue getlastpoaauditedpos (const UniValue &params, bool fHelp)
 
void validaterange (const UniValue &params, int &heightStart, int &heightEnd, int minHeightStart)
 
UniValue getblockindexstats (const UniValue &params, bool fHelp)
 

Function Documentation

◆ blockheaderToJSON()

UniValue blockheaderToJSON ( const CBlockIndex blockindex)

Definition at line 67 of file blockchain.cpp.

Here is the call graph for this function:

◆ blockToJSON()

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

Definition at line 95 of file blockchain.cpp.

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

◆ getbestblockhash()

UniValue getbestblockhash ( const UniValue params,
bool  fHelp 
)

Definition at line 209 of file blockchain.cpp.

Here is the call graph for this function:

◆ getblock()

UniValue getblock ( const UniValue params,
bool  fHelp 
)

Definition at line 486 of file blockchain.cpp.

Here is the call graph for this function:

◆ getblockchaininfo()

UniValue getblockchaininfo ( const UniValue params,
bool  fHelp 
)

Definition at line 767 of file blockchain.cpp.

Here is the call graph for this function:

◆ getblockcount()

UniValue getblockcount ( const UniValue params,
bool  fHelp 
)

Definition at line 194 of file blockchain.cpp.

Here is the call graph for this function:

◆ getblockhash()

UniValue getblockhash ( const UniValue params,
bool  fHelp 
)

Definition at line 463 of file blockchain.cpp.

Here is the call graph for this function:

◆ getblockheader()

UniValue getblockheader ( const UniValue params,
bool  fHelp 
)

Definition at line 548 of file blockchain.cpp.

Here is the call graph for this function:

◆ getblockindexstats()

UniValue getblockindexstats ( const UniValue params,
bool  fHelp 
)

Definition at line 1392 of file blockchain.cpp.

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

◆ getchaintips()

UniValue getchaintips ( const UniValue params,
bool  fHelp 
)

Definition at line 830 of file blockchain.cpp.

Here is the call graph for this function:

◆ GetDifficulty()

double GetDifficulty ( const CBlockIndex blockindex)

Definition at line 39 of file blockchain.cpp.

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

◆ getdifficulty()

UniValue getdifficulty ( const UniValue params,
bool  fHelp 
)

Definition at line 364 of file blockchain.cpp.

Here is the call graph for this function:

◆ getfeeinfo()

UniValue getfeeinfo ( const UniValue params,
bool  fHelp 
)

Definition at line 919 of file blockchain.cpp.

Here is the call graph for this function:

◆ getinvalid()

UniValue getinvalid ( const UniValue params,
bool  fHelp 
)

Definition at line 1094 of file blockchain.cpp.

Here is the call graph for this function:

◆ getlastpoaauditedpos()

UniValue getlastpoaauditedpos ( const UniValue params,
bool  fHelp 
)

Definition at line 1328 of file blockchain.cpp.

Here is the call graph for this function:

◆ getlastpoablock()

UniValue getlastpoablock ( const UniValue params,
bool  fHelp 
)

Definition at line 1224 of file blockchain.cpp.

Here is the call graph for this function:

◆ getlastpoablockhash()

UniValue getlastpoablockhash ( const UniValue params,
bool  fHelp 
)

Definition at line 1251 of file blockchain.cpp.

Here is the call graph for this function:

◆ getlastpoablockheight()

UniValue getlastpoablockheight ( const UniValue params,
bool  fHelp 
)

Definition at line 1276 of file blockchain.cpp.

Here is the call graph for this function:

◆ getlastpoablocktime()

UniValue getlastpoablocktime ( const UniValue params,
bool  fHelp 
)

Definition at line 1301 of file blockchain.cpp.

Here is the call graph for this function:

◆ getmaxsupply()

UniValue getmaxsupply ( const UniValue params,
bool  fHelp 
)

Definition at line 180 of file blockchain.cpp.

Here is the call graph for this function:

◆ getmempoolinfo()

UniValue getmempoolinfo ( const UniValue params,
bool  fHelp 
)

Definition at line 969 of file blockchain.cpp.

Here is the call graph for this function:

◆ getrawmempool()

UniValue getrawmempool ( const UniValue params,
bool  fHelp 
)

Definition at line 423 of file blockchain.cpp.

Here is the call graph for this function:

◆ getsupply()

UniValue getsupply ( const UniValue params,
bool  fHelp 
)

Definition at line 165 of file blockchain.cpp.

Here is the call graph for this function:

◆ gettxout()

UniValue gettxout ( const UniValue params,
bool  fHelp 
)
Todo:
: this should be done by the CCoinsViewMemPool

Definition at line 635 of file blockchain.cpp.

Here is the call graph for this function:

◆ gettxoutsetinfo()

UniValue gettxoutsetinfo ( const UniValue params,
bool  fHelp 
)

Definition at line 599 of file blockchain.cpp.

Here is the call graph for this function:

◆ invalidateblock()

UniValue invalidateblock ( const UniValue params,
bool  fHelp 
)

Definition at line 986 of file blockchain.cpp.

Here is the call graph for this function:

◆ mempoolInfoToJSON()

UniValue mempoolInfoToJSON ( )

Definition at line 959 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 380 of file blockchain.cpp.

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

◆ PoSBlockInfoToJSON()

void PoSBlockInfoToJSON ( const uint256  hashBlock,
int64_t  nTime,
int  height,
UniValue entry 
)

Definition at line 59 of file rawtransaction.cpp.

Here is the call graph for this function:

◆ reconsiderblock()

UniValue reconsiderblock ( const UniValue params,
bool  fHelp 
)

Definition at line 1057 of file blockchain.cpp.

Here is the call graph for this function:

◆ resyncfrom()

UniValue resyncfrom ( const UniValue params,
bool  fHelp 
)

Definition at line 1022 of file blockchain.cpp.

Here is the call graph for this function:

◆ RPCNotifyBlockChange()

void RPCNotifyBlockChange ( bool  fInitialDownload,
const CBlockIndex pindex 
)

Definition at line 224 of file blockchain.cpp.

Here is the caller graph for this function:

◆ ScriptPubKeyToJSON()

void ScriptPubKeyToJSON ( const CScript scriptPubKey,
UniValue out,
bool  fIncludeHex 
)

Definition at line 34 of file rawtransaction.cpp.

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

◆ setmaxreorgdepth()

UniValue setmaxreorgdepth ( const UniValue params,
bool  fHelp 
)

Definition at line 1201 of file blockchain.cpp.

Here is the call graph for this function:

◆ TxToJSON()

void TxToJSON ( const CTransaction tx,
const uint256  hashBlock,
UniValue entry 
)

Definition at line 66 of file rawtransaction.cpp.

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

◆ validaterange()

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

Definition at line 1359 of file blockchain.cpp.

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

◆ verifychain()

UniValue verifychain ( const UniValue params,
bool  fHelp 
)

Definition at line 712 of file blockchain.cpp.

Here is the call graph for this function:

◆ waitforblock()

UniValue waitforblock ( const UniValue params,
bool  fHelp 
)

Definition at line 274 of file blockchain.cpp.

Here is the call graph for this function:

◆ waitforblockheight()

UniValue waitforblockheight ( const UniValue params,
bool  fHelp 
)

Definition at line 319 of file blockchain.cpp.

Here is the call graph for this function:

◆ waitfornewblock()

UniValue waitfornewblock ( const UniValue params,
bool  fHelp 
)

Definition at line 234 of file blockchain.cpp.

Here is the call graph for this function: