Master Core  v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
rpcblockchain.cpp File Reference
#include "rpcserver.h"
#include "main.h"
#include "sync.h"
#include "checkpoints.h"
#include <stdint.h>
#include "json/json_spirit_value.h"
+ Include dependency graph for rpcblockchain.cpp:

Go to the source code of this file.

Functions

void ScriptPubKeyToJSON (const CScript &scriptPubKey, Object &out, bool fIncludeHex)
 
double GetDifficulty (const CBlockIndex *blockindex)
 
Object blockToJSON (const CBlock &block, const CBlockIndex *blockindex)
 
Value getblockcount (const Array &params, bool fHelp)
 
Value getbestblockhash (const Array &params, bool fHelp)
 
Value getdifficulty (const Array &params, bool fHelp)
 
Value getrawmempool (const Array &params, bool fHelp)
 
Value getblockhash (const Array &params, bool fHelp)
 
Value getblock (const Array &params, bool fHelp)
 
Value gettxoutsetinfo (const Array &params, bool fHelp)
 
Value gettxout (const Array &params, bool fHelp)
 
Value verifychain (const Array &params, bool fHelp)
 
Value getblockchaininfo (const Array &params, bool fHelp)
 

Function Documentation

Object blockToJSON ( const CBlock block,
const CBlockIndex blockindex 
)

Definition at line 52 of file rpcblockchain.cpp.

References chainActive, CBlockIndex::GetBlockHash(), CBlockHeader::GetBlockTime(), CMerkleTx::GetDepthInMainChain(), GetDifficulty(), CTransaction::GetHash(), CBlockHeader::GetHash(), base_uint< BITS >::GetHex(), GetSerializeSize(), CBlockHeader::hashMerkleRoot, HexBits(), CBlockHeader::nBits, CBlockIndex::nChainWork, CChain::Next(), CBlockIndex::nHeight, CBlockHeader::nNonce, CBlockHeader::nVersion, CBlockIndex::pprev, PROTOCOL_VERSION, SER_NETWORK, and CBlock::vtx.

Referenced by getblock().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Value getbestblockhash ( const Array &  params,
bool  fHelp 
)

Definition at line 98 of file rpcblockchain.cpp.

References chainActive, CBlockIndex::GetBlockHash(), base_uint< BITS >::GetHex(), HelpExampleCli(), HelpExampleRpc(), and CChain::Tip().

+ Here is the call graph for this function:

Value getblock ( const Array &  params,
bool  fHelp 
)

Definition at line 231 of file rpcblockchain.cpp.

References CDataStream::begin(), blockToJSON(), CDataStream::end(), HelpExampleCli(), HelpExampleRpc(), HexStr(), JSONRPCError(), mapBlockIndex, PROTOCOL_VERSION, ReadBlockFromDisk(), RPC_INTERNAL_ERROR, RPC_INVALID_ADDRESS_OR_KEY, and SER_NETWORK.

+ Here is the call graph for this function:

Value getblockchaininfo ( const Array &  params,
bool  fHelp 
)

Definition at line 435 of file rpcblockchain.cpp.

References chainActive, CChainParams::DataDir(), CBlockIndex::GetBlockHash(), GetDifficulty(), base_uint< BITS >::GetHex(), GetProxy(), Checkpoints::GuessVerificationProgress(), CChain::Height(), HelpExampleCli(), HelpExampleRpc(), CBlockIndex::nChainWork, NET_IPV4, Params(), and CChain::Tip().

+ Here is the call graph for this function:

Value getblockcount ( const Array &  params,
bool  fHelp 
)

Definition at line 82 of file rpcblockchain.cpp.

References chainActive, CChain::Height(), HelpExampleCli(), and HelpExampleRpc().

+ Here is the call graph for this function:

Value getblockhash ( const Array &  params,
bool  fHelp 
)

Definition at line 208 of file rpcblockchain.cpp.

References chainActive, CBlockIndex::GetBlockHash(), base_uint< BITS >::GetHex(), CChain::Height(), HelpExampleCli(), and HelpExampleRpc().

+ Here is the call graph for this function:

double GetDifficulty ( const CBlockIndex blockindex)

Definition at line 20 of file rpcblockchain.cpp.

References chainActive, CBlockIndex::nBits, and CChain::Tip().

Referenced by blockToJSON(), getblockchaininfo(), getdifficulty(), getinfo(), and getmininginfo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Value getdifficulty ( const Array &  params,
bool  fHelp 
)

Definition at line 114 of file rpcblockchain.cpp.

References GetDifficulty(), HelpExampleCli(), and HelpExampleRpc().

+ Here is the call graph for this function:

Value getrawmempool ( const Array &  params,
bool  fHelp 
)
Value gettxout ( const Array &  params,
bool  fHelp 
)
Value gettxoutsetinfo ( const Array &  params,
bool  fHelp 
)

Definition at line 294 of file rpcblockchain.cpp.

References base_uint< BITS >::GetHex(), CCoinsViewBacked::GetStats(), CCoinsStats::hashBlock, CCoinsStats::hashSerialized, HelpExampleCli(), HelpExampleRpc(), CCoinsStats::nHeight, CCoinsStats::nSerializedSize, CCoinsStats::nTotalAmount, CCoinsStats::nTransactionOutputs, CCoinsStats::nTransactions, pcoinsTip, and ValueFromAmount().

+ Here is the call graph for this function:

void ScriptPubKeyToJSON ( const CScript scriptPubKey,
Object &  out,
bool  fIncludeHex 
)

Definition at line 29 of file rpcrawtransaction.cpp.

References ExtractDestinations(), GetTxnOutputType(), HexStr(), and CScript::ToString().

Referenced by decodescript(), gettxout(), and TxToJSON().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Value verifychain ( const Array &  params,
bool  fHelp 
)

Definition at line 409 of file rpcblockchain.cpp.

References GetArg(), HelpExampleCli(), HelpExampleRpc(), and VerifyDB().

+ Here is the call graph for this function: