36 if (blockindex == NULL)
44 int nShift = (blockindex->
nBits >> 24) & 0xff;
47 (double)0x0000ffff / (
double)(blockindex->
nBits & 0x00ffffff);
67 int confirmations = -1;
71 result.push_back(
Pair(
"confirmations", confirmations));
82 if (blockindex->
pprev)
94 int confirmations = -1;
98 result.push_back(
Pair(
"confirmations", confirmations));
123 if (blockindex->
pprev)
133 if (fHelp || params.
size() != 0)
136 "\nReturns the number of blocks in the longest block chain.\n" 138 "n (numeric) The current block count\n" 150 if (fHelp || params.
size() != 0)
153 "\nReturns the hash of the best (tip) block in the longest block chain.\n" 155 "\"hex\" (string) the block hash hex encoded\n" 167 if (fHelp || params.
size() != 0)
170 "\nReturns the proof-of-work difficulty as a multiple of the minimum difficulty.\n" 172 "n.nnn (numeric) the proof-of-work difficulty as a multiple of the minimum difficulty.\n" 203 set<string> setDepends;
204 BOOST_FOREACH(
const CTxIn& txin, tx.
vin)
211 BOOST_FOREACH(
const string& dep, setDepends)
223 vector<uint256> vtxid;
227 BOOST_FOREACH(
const uint256& hash, vtxid)
236 if (fHelp || params.
size() > 1)
238 "getrawmempool ( verbose )\n" 239 "\nReturns all transaction ids in memory pool as a json array of string transaction ids.\n" 241 "1. verbose (boolean, optional, default=false) true for a json object, false for array of transaction ids\n" 242 "\nResult: (for verbose = false):\n" 243 "[ (json array of string)\n" 244 " \"transactionid\" (string) The transaction id\n" 247 "\nResult: (for verbose = true):\n" 249 " \"transactionid\" : { (json object)\n" 250 " \"size\" : n, (numeric) transaction size in bytes\n" 251 " \"fee\" : n, (numeric) transaction fee in " +
CURRENCY_UNIT +
"\n" 252 " \"modifiedfee\" : n, (numeric) transaction fee with fee deltas used for mining priority\n" 253 " \"time\" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT\n" 254 " \"height\" : n, (numeric) block height when transaction entered pool\n" 255 " \"startingpriority\" : n, (numeric) priority when transaction entered pool\n" 256 " \"currentpriority\" : n, (numeric) transaction priority now\n" 257 " \"descendantcount\" : n, (numeric) number of in-mempool descendant transactions (including this one)\n" 258 " \"descendantsize\" : n, (numeric) size of in-mempool descendants (including this one)\n" 259 " \"descendantfees\" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)\n" 260 " \"depends\" : [ (array) unconfirmed transactions used as inputs for this transaction\n" 261 " \"transactionid\", (string) parent transaction id\n" 270 bool fVerbose =
false;
271 if (params.
size() > 0)
272 fVerbose = params[0].get_bool();
279 if (fHelp || params.
size() != 2)
281 "getblockhashes timestamp\n" 282 "\nReturns array of hashes of blocks within the timestamp range provided.\n" 284 "1. high (numeric, required) The newer block timestamp\n" 285 "2. low (numeric, required) The older block timestamp\n" 288 " \"hash\" (string) The block hash\n" 297 std::vector<uint256> blockHashes;
304 for (std::vector<uint256>::const_iterator it=blockHashes.begin(); it!=blockHashes.end(); it++) {
305 result.push_back(it->GetHex());
313 if (fHelp || params.
size() != 1)
315 "getblockhash index\n" 316 "\nReturns hash of block in best-block-chain at index provided.\n" 318 "1. index (numeric, required) The block index\n" 320 "\"hash\" (string) The block hash\n" 328 int nHeight = params[0].
get_int();
338 if (fHelp || params.
size() < 1 || params.
size() > 2)
340 "getblockheader \"hash\" ( verbose )\n" 341 "\nIf verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'.\n" 342 "If verbose is true, returns an Object with information about blockheader <hash>.\n" 344 "1. \"hash\" (string, required) The block hash\n" 345 "2. verbose (boolean, optional, default=true) true for a json object, false for the hex encoded data\n" 346 "\nResult (for verbose = true):\n" 348 " \"hash\" : \"hash\", (string) the block hash (same as provided)\n" 349 " \"confirmations\" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain\n" 350 " \"height\" : n, (numeric) The block height or index\n" 351 " \"version\" : n, (numeric) The block version\n" 352 " \"merkleroot\" : \"xxxx\", (string) The merkle root\n" 353 " \"time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n" 354 " \"mediantime\" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)\n" 355 " \"nonce\" : n, (numeric) The nonce\n" 356 " \"bits\" : \"1d00ffff\", (string) The bits\n" 357 " \"difficulty\" : x.xxx, (numeric) The difficulty\n" 358 " \"previousblockhash\" : \"hash\", (string) The hash of the previous block\n" 359 " \"nextblockhash\" : \"hash\", (string) The hash of the next block\n" 360 " \"chainwork\" : \"0000...1f3\" (string) Expected number of hashes required to produce the current chain (in hex)\n" 362 "\nResult (for verbose=false):\n" 363 "\"data\" (string) A string that is serialized, hex-encoded data for block 'hash'.\n" 365 +
HelpExampleCli(
"getblockheader",
"\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"")
366 +
HelpExampleRpc(
"getblockheader",
"\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"")
371 std::string strHash = params[0].
get_str();
374 bool fVerbose =
true;
375 if (params.
size() > 1)
376 fVerbose = params[1].get_bool();
396 if (fHelp || params.
size() < 1 || params.
size() > 3)
398 "getblockheaders \"hash\" ( count verbose )\n" 399 "\nReturns an array of items with information about <count> blockheaders starting from <hash>.\n" 400 "\nIf verbose is false, each item is a string that is serialized, hex-encoded data for a single blockheader.\n" 401 "If verbose is true, each item is an Object with information about a single blockheader.\n" 403 "1. \"hash\" (string, required) The block hash\n" 405 "3. verbose (boolean, optional, default=true) true for a json object, false for the hex encoded data\n" 406 "\nResult (for verbose = true):\n" 408 " \"hash\" : \"hash\", (string) The block hash\n" 409 " \"confirmations\" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain\n" 410 " \"height\" : n, (numeric) The block height or index\n" 411 " \"version\" : n, (numeric) The block version\n" 412 " \"merkleroot\" : \"xxxx\", (string) The merkle root\n" 413 " \"time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n" 414 " \"mediantime\" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)\n" 415 " \"nonce\" : n, (numeric) The nonce\n" 416 " \"bits\" : \"1d00ffff\", (string) The bits\n" 417 " \"difficulty\" : x.xxx, (numeric) The difficulty\n" 418 " \"previousblockhash\" : \"hash\", (string) The hash of the previous block\n" 419 " \"nextblockhash\" : \"hash\", (string) The hash of the next block\n" 420 " \"chainwork\" : \"0000...1f3\" (string) Expected number of hashes required to produce the current chain (in hex)\n" 426 "\nResult (for verbose=false):\n" 428 " \"data\", (string) A string that is serialized, hex-encoded data for block header.\n" 432 +
HelpExampleCli(
"getblockheaders",
"\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\" 2000")
433 +
HelpExampleRpc(
"getblockheaders",
"\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\" 2000")
438 std::string strHash = params[0].
get_str();
445 if (params.
size() > 1)
446 nCount = params[1].get_int();
451 bool fVerbose =
true;
452 if (params.
size() > 2)
453 fVerbose = params[2].get_bool();
485 if (fHelp || params.
size() < 1 || params.
size() > 2)
487 "getblock \"hash\" ( verbose )\n" 488 "\nIf verbose is false, returns a string that is serialized, hex-encoded data for block 'hash'.\n" 489 "If verbose is true, returns an Object with information about block <hash>.\n" 491 "1. \"hash\" (string, required) The block hash\n" 492 "2. verbose (boolean, optional, default=true) true for a json object, false for the hex encoded data\n" 493 "\nResult (for verbose = true):\n" 495 " \"hash\" : \"hash\", (string) the block hash (same as provided)\n" 496 " \"confirmations\" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain\n" 497 " \"size\" : n, (numeric) The block size\n" 498 " \"height\" : n, (numeric) The block height or index\n" 499 " \"version\" : n, (numeric) The block version\n" 500 " \"merkleroot\" : \"xxxx\", (string) The merkle root\n" 501 " \"tx\" : [ (array of string) The transaction ids\n" 502 " \"transactionid\" (string) The transaction id\n" 505 " \"time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n" 506 " \"mediantime\" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)\n" 507 " \"nonce\" : n, (numeric) The nonce\n" 508 " \"bits\" : \"1d00ffff\", (string) The bits\n" 509 " \"difficulty\" : x.xxx, (numeric) The difficulty\n" 510 " \"chainwork\" : \"xxxx\", (string) Expected number of hashes required to produce the chain up to this block (in hex)\n" 511 " \"previousblockhash\" : \"hash\", (string) The hash of the previous block\n" 512 " \"nextblockhash\" : \"hash\" (string) The hash of the next block\n" 514 "\nResult (for verbose=false):\n" 515 "\"data\" (string) A string that is serialized, hex-encoded data for block 'hash'.\n" 517 +
HelpExampleCli(
"getblock",
"\"00000000000fd08c2fb661d2fcb0d49abb3a91e5f27082ce64feed3b4dede2e2\"")
518 +
HelpExampleRpc(
"getblock",
"\"00000000000fd08c2fb661d2fcb0d49abb3a91e5f27082ce64feed3b4dede2e2\"")
523 std::string strHash = params[0].
get_str();
526 bool fVerbose =
true;
527 if (params.
size() > 1)
528 fVerbose = params[1].get_bool();
555 if (fHelp || params.
size() != 0)
558 "\nReturns statistics about the unspent transaction output set.\n" 559 "Note this call may take some time.\n" 562 " \"height\":n, (numeric) The current block height (index)\n" 563 " \"bestblock\": \"hex\", (string) the best block hash hex\n" 564 " \"transactions\": n, (numeric) The number of transactions\n" 565 " \"txouts\": n, (numeric) The number of output transactions\n" 566 " \"bytes_serialized\": n, (numeric) The serialized size\n" 567 " \"hash_serialized\": \"hash\", (string) The serialized hash\n" 568 " \"total_amount\": x.xxx (numeric) The total amount\n" 593 if (fHelp || params.
size() < 2 || params.
size() > 3)
595 "gettxout \"txid\" n ( includemempool )\n" 596 "\nReturns details about an unspent transaction output.\n" 598 "1. \"txid\" (string, required) The transaction id\n" 599 "2. n (numeric, required) vout value\n" 600 "3. includemempool (boolean, optional) Whether to included the mem pool\n" 603 " \"bestblock\" : \"hash\", (string) the block hash\n" 604 " \"confirmations\" : n, (numeric) The number of confirmations\n" 605 " \"value\" : x.xxx, (numeric) The transaction value in " +
CURRENCY_UNIT +
"\n" 606 " \"scriptPubKey\" : { (json object)\n" 607 " \"asm\" : \"code\", (string) \n" 608 " \"hex\" : \"hex\", (string) \n" 609 " \"reqSigs\" : n, (numeric) Number of required signatures\n" 610 " \"type\" : \"pubkeyhash\", (string) The type, eg pubkeyhash\n" 611 " \"addresses\" : [ (array of string) array of dash addresses\n" 612 " \"dashaddress\" (string) dash address\n" 616 " \"version\" : n, (numeric) The version\n" 617 " \"coinbase\" : true|false (boolean) Coinbase or not\n" 621 "\nGet unspent transactions\n" 623 "\nView the details\n" 625 "\nAs a json rpc call\n" 633 std::string strHash = params[0].
get_str();
636 bool fMempool =
true;
637 if (params.
size() > 2)
638 fMempool = params[2].get_bool();
651 if (
n<0 || (
unsigned int)
n>=coins.
vout.size() || coins.
vout[
n].IsNull())
675 if (fHelp || params.
size() > 2)
677 "verifychain ( checklevel numblocks )\n" 678 "\nVerifies blockchain database.\n" 680 "1. checklevel (numeric, optional, 0-4, default=" +
strprintf(
"%d", nCheckLevel) +
") How thorough the block verification is.\n" 681 "2. numblocks (numeric, optional, default=" +
strprintf(
"%d", nCheckDepth) +
", 0=all) The number of blocks to check.\n" 683 "true|false (boolean) Verified or not\n" 691 if (params.
size() > 0)
692 nCheckLevel = params[0].get_int();
693 if (params.
size() > 1)
694 nCheckDepth = params[1].get_int();
704 for (
int i = 0; i < consensusParams.
nMajorityWindow && pstart != NULL; i++)
708 pstart = pstart->
pprev;
745 if (fHelp || params.
size() != 0)
747 "getblockchaininfo\n" 748 "Returns an object containing various state info regarding block chain processing.\n" 751 " \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n" 752 " \"blocks\": xxxxxx, (numeric) the current number of blocks processed in the server\n" 753 " \"headers\": xxxxxx, (numeric) the current number of headers we have validated\n" 754 " \"bestblockhash\": \"...\", (string) the hash of the currently best block\n" 755 " \"difficulty\": xxxxxx, (numeric) the current difficulty\n" 756 " \"mediantime\": xxxxxx, (numeric) median time for the current best block\n" 757 " \"verificationprogress\": xxxx, (numeric) estimate of verification progress [0..1]\n" 758 " \"chainwork\": \"xxxx\" (string) total amount of work in active chain, in hexadecimal\n" 759 " \"pruned\": xx, (boolean) if the blocks are subject to pruning\n" 760 " \"pruneheight\": xxxxxx, (numeric) heighest block available\n" 761 " \"softforks\": [ (array) status of softforks in progress\n" 763 " \"id\": \"xxxx\", (string) name of softfork\n" 764 " \"version\": xx, (numeric) block version\n" 765 " \"enforce\": { (object) progress toward enforcing the softfork rules for new-version blocks\n" 766 " \"status\": xx, (boolean) true if threshold reached\n" 767 " \"found\": xx, (numeric) number of blocks with the new version found\n" 768 " \"required\": xx, (numeric) number of blocks required to trigger\n" 769 " \"window\": xx, (numeric) maximum size of examined window of recent blocks\n" 771 " \"reject\": { ... } (object) progress toward rejecting pre-softfork blocks (same fields as \"enforce\")\n" 774 " \"bip9_softforks\": [ (array) status of BIP9 softforks in progress\n" 776 " \"id\": \"xxxx\", (string) name of the softfork\n" 777 " \"status\": \"xxxx\", (string) one of \"defined\", \"started\", \"lockedin\", \"active\", \"failed\"\n" 815 block = block->
pprev;
839 if (fHelp || params.
size() > 2)
841 "getchaintips ( count branchlen )\n" 842 "Return information about all known tips in the block tree," 843 " including the main chain as well as orphaned branches.\n" 845 "1. count (numeric, optional) only show this much of latest tips\n" 846 "2. branchlen (numeric, optional) only show tips that have equal or greater length of branch\n" 850 " \"height\": xxxx, (numeric) height of the chain tip\n" 851 " \"hash\": \"xxxx\", (string) block hash of the tip\n" 852 " \"difficulty\" : x.xxx, (numeric) The difficulty\n" 853 " \"chainwork\" : \"0000...1f3\" (string) Expected number of hashes required to produce the current chain (in hex)\n" 854 " \"branchlen\": 0 (numeric) zero for main chain\n" 855 " \"status\": \"active\" (string) \"active\" for the main chain\n" 858 " \"height\": xxxx,\n" 859 " \"hash\": \"xxxx\",\n" 860 " \"difficulty\" : x.xxx,\n" 861 " \"chainwork\" : \"0000...1f3\"\n" 862 " \"branchlen\": 1 (numeric) length of branch connecting the tip to the main chain\n" 863 " \"status\": \"xxxx\" (string) status of the chain (active, valid-fork, valid-headers, headers-only, invalid)\n" 866 "Possible values for status:\n" 867 "1. \"invalid\" This branch contains at least one invalid block\n" 868 "2. \"headers-only\" Not all blocks for this branch are available, but the headers are valid\n" 869 "3. \"valid-headers\" All blocks are available for this branch, but they were never fully validated\n" 870 "4. \"valid-fork\" This branch is not part of the active chain, but is fully validated\n" 871 "5. \"active\" This is the tip of the active main chain, which is certainly valid\n" 882 std::set<const CBlockIndex*, CompareBlocksByHeight> setTips;
884 setTips.insert(item.second);
889 setTips.erase(pprev);
896 int nCountMax = INT_MAX;
898 if(params.
size() >= 1)
899 nCountMax = params[0].get_int();
901 if(params.
size() == 2)
902 nBranchMin = params[1].get_int();
909 if(branchLen < nBranchMin)
continue;
911 if(nCountMax-- < 1)
break;
929 status =
"headers-only";
932 status =
"valid-fork";
935 status =
"valid-headers";
963 if (fHelp || params.
size() != 0)
966 "\nReturns details on the active state of the TX memory pool.\n" 969 " \"size\": xxxxx, (numeric) Current tx count\n" 970 " \"bytes\": xxxxx, (numeric) Sum of all tx sizes\n" 971 " \"usage\": xxxxx, (numeric) Total memory usage for the mempool\n" 972 " \"maxmempool\": xxxxx, (numeric) Maximum memory usage for the mempool\n" 973 " \"mempoolminfee\": xxxxx (numeric) Minimum fee for tx to be accepted\n" 985 if (fHelp || params.
size() != 1)
987 "invalidateblock \"hash\"\n" 988 "\nPermanently marks a block as invalid, as if it violated a consensus rule.\n" 990 "1. hash (string, required) the hash of the block to mark as invalid\n" 997 std::string strHash = params[0].
get_str();
1023 if (fHelp || params.
size() != 1)
1024 throw runtime_error(
1025 "reconsiderblock \"hash\"\n" 1026 "\nRemoves invalidity status of a block and its descendants, reconsider them for activation.\n" 1027 "This can be used to undo the effects of invalidateblock.\n" 1029 "1. hash (string, required) the hash of the block to reconsider\n" 1036 std::string strHash = params[0].
get_str();
arith_uint256 nChainWork
(memory only) Total amount of work (expected number of hashes) in the chain up to and including this ...
bool ActivateBestChain(CValidationState &state, const CChainParams &chainparams, const CBlock *pblock)
bool GetCoins(const uint256 &txid, CCoins &coins) const
Retrieve the CCoins (unspent transaction outputs) for a given txid.
bool GetStats(CCoinsStats &stats) const
Calculate statistics about the unspent transaction output set.
void queryHashes(std::vector< uint256 > &vtxid)
unsigned int GetHeight() const
std::string GetRejectReason() const
UniValue getblockheader(const UniValue ¶ms, bool fHelp)
static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE
UniValue getdifficulty(const UniValue ¶ms, bool fHelp)
descends from failed block
const Consensus::Params & GetConsensus() const
uint64_t nTransactionOutputs
UniValue mempoolInfoToJSON()
bool IsValid(enum BlockStatus nUpTo=BLOCK_VALID_TRANSACTIONS) const
Check whether this block index entry is valid up to the passed validity level.
CBlockHeader GetBlockHeader() const
const std::string CURRENCY_UNIT
bool GetCoins(const uint256 &txid, CCoins &coins) const
Retrieve the CCoins (unspent transaction outputs) for a given txid.
std::string HexStr(const T itbegin, const T itend, bool fSpaces=false)
UniValue reconsiderblock(const UniValue ¶ms, bool fHelp)
UniValue blockheaderToJSON(const CBlockIndex *blockindex)
bool fCoinBase
whether transaction is a coinbase
const_iterator end() const
std::string HelpExampleRpc(const std::string &methodname, const std::string &args)
UniValue getblockheaders(const UniValue ¶ms, bool fHelp)
uint64_t GetCountWithDescendants() const
double GetDifficulty(const CBlockIndex *blockindex)
UniValue gettxout(const UniValue ¶ms, bool fHelp)
indexed_transaction_set mapTx
uint64_t GetTotalTxSize()
UniValue getblock(const UniValue ¶ms, bool fHelp)
bool push_back(const UniValue &val)
UniValue ValueFromAmount(const CAmount &amount)
Ran out of memory during operation.
UniValue getblockhashes(const UniValue ¶ms, bool fHelp)
ThresholdState VersionBitsTipState(const Consensus::Params ¶ms, Consensus::DeploymentPos pos)
const CAmount & GetFee() const
std::vector< CTransaction > vtx
bool Contains(const CBlockIndex *pindex) const
bool exists(uint256 hash) const
CCoinsViewCache * pcoinsTip
UniValue verifychain(const UniValue ¶ms, bool fHelp)
std::vector< CTxOut > vout
unspent transaction outputs; spent outputs are .IsNull(); spent outputs at the end of the array are d...
const uint256 * phashBlock
pointer to the hash of the block, if any. Memory is owned by this CBlockIndex
UniValue getmempoolinfo(const UniValue ¶ms, bool fHelp)
void TxToJSON(const CTransaction &tx, const uint256 hashBlock, UniValue &entry)
unsigned int GetSerializeSize(char a, int, int=0)
CBlockIndex * pindexBestHeader
UniValue getblockhash(const UniValue ¶ms, bool fHelp)
bool operator()(const CBlockIndex *a, const CBlockIndex *b) const
const_iterator begin() const
UniValue getblockcount(const UniValue ¶ms, bool fHelp)
const CTransaction & GetTx() const
size_t DynamicMemoryUsage() const
static const unsigned int MAX_HEADERS_RESULTS
uint256 uint256S(const char *str)
CAmount GetFeePerK() const
const CBlockIndex * FindFork(const CBlockIndex *pindex) const
static UniValue BIP9SoftForkDesc(const std::string &name, const Consensus::Params &consensusParams, Consensus::DeploymentPos id)
int nMajorityRejectBlockOutdated
std::string ToString() const
Unexpected type was passed as parameter.
std::string HelpExampleCli(const std::string &methodname, const std::string &args)
static std::pair< std::string, UniValue > Pair(const char *cKey, const char *cVal)
int nMajorityEnforceBlockUpgrade
double GuessVerificationProgress(const CCheckpointData &data, CBlockIndex *pindex, bool fSigchecks)
Guess how far we are in the verification process at the given block index.
static UniValue SoftForkDesc(const std::string &name, int version, CBlockIndex *pindex, const Consensus::Params &consensusParams)
static bool FlushStateToDisk(CValidationState &state, FlushStateMode mode)
Invalid, missing or duplicate parameter.
CAmount GetModFeesWithDescendants() const
const std::vector< CTxIn > vin
UniValue blockToJSON(const CBlock &block, const CBlockIndex *blockindex, bool txDetails=false)
int64_t GetModifiedFee() const
UniValue gettxoutsetinfo(const UniValue ¶ms, bool fHelp)
bool InvalidateBlock(CValidationState &state, const Consensus::Params &consensusParams, CBlockIndex *pindex)
CBlockIndex * Next(const CBlockIndex *pindex) const
UniValue getrawmempool(const UniValue ¶ms, bool fHelp)
const CChainParams & Params()
static const signed int DEFAULT_CHECKBLOCKS
static const int PROTOCOL_VERSION
const uint256 & GetHash() const
unsigned int nStatus
Verification status of this block. See enum BlockStatus.
uint256 GetBlockHash() const
UniValue getbestblockhash(const UniValue ¶ms, bool fHelp)
UniValue invalidateblock(const UniValue ¶ms, bool fHelp)
std::string GetHex() const
void pruneSpent(const uint256 &hash, CCoins &coins)
const UniValue NullUniValue
uint256 GetBestBlock() const
Retrieve the block hash whose state this CCoinsView currently represents.
CFeeRate GetMinFee(size_t sizelimit) const
Scripts & signatures ok. Implies all parents are also at least SCRIPTS.
CBlockIndex * Tip() const
bool VerifyDB(const CChainParams &chainparams, CCoinsView *coinsview, int nCheckLevel, int nCheckDepth)
int64_t GetMedianTimePast() const
bool ReconsiderBlock(CValidationState &state, CBlockIndex *pindex)
double GetPriority(unsigned int currentHeight) const
std::string GetArg(const std::string &strArg, const std::string &strDefault)
CBlockIndex * pprev
pointer to the index of the predecessor of this block
std::string GetHex() const
static const unsigned int MEMPOOL_HEIGHT
bool ReadBlockFromDisk(CBlock &block, const CDiskBlockPos &pos, const Consensus::Params &consensusParams)
UniValue mempoolToJSON(bool fVerbose=false)
int nHeight
height of the entry in the chain. The genesis block has height 0
void ScriptPubKeyToJSON(const CScript &scriptPubKey, UniValue &out, bool fIncludeHex)
uint64_t GetSizeWithDescendants() const
bool GetTimestampIndex(const unsigned int &high, const unsigned int &low, std::vector< uint256 > &hashes)
UniValue JSONRPCError(int code, const string &message)
UniValue getchaintips(const UniValue ¶ms, bool fHelp)
UniValue getblockchaininfo(const UniValue ¶ms, bool fHelp)
static const unsigned int DEFAULT_CHECKLEVEL
std::string get_str() const
int nHeight
at which height this transaction was included in the active block chain
static UniValue SoftForkMajorityDesc(int minVersion, CBlockIndex *pindex, int nRequired, const Consensus::Params &consensusParams)