@@ -447,7 +447,7 @@ UniValue getrawmempool(const JSONRPCRequest& request)
447447 " \n Returns all transaction ids in memory pool as a json array of string transaction ids.\n "
448448
449449 " \n Arguments:\n "
450- " 1. verbose (boolean, optional, default=false) true for a json object, false for array of transaction ids\n "
450+ " 1. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids\n "
451451
452452 " \n Result: (for verbose = false):\n "
453453 " [ (json array of string)\n "
@@ -490,11 +490,11 @@ UniValue getblockhash(const JSONRPCRequest& request)
490490{
491491 if (request.fHelp || request.params .size () != 1 )
492492 throw std::runtime_error (
493- " getblockhash index \n "
494- " \n Returns hash of block in best-block-chain at index provided.\n "
493+ " getblockhash height \n "
494+ " \n Returns hash of block in best-block-chain at height provided.\n "
495495
496496 " \n Arguments:\n "
497- " 1. index (numeric, required) The block index\n "
497+ " 1. height (numeric, required) The height index\n "
498498
499499 " \n Result:\n "
500500 " \" hash\" (string) The block hash\n "
@@ -516,13 +516,13 @@ UniValue getblock(const JSONRPCRequest& request)
516516{
517517 if (request.fHelp || request.params .size () < 1 || request.params .size () > 2 )
518518 throw std::runtime_error (
519- " getblock \" hash \" ( verbose )\n "
519+ " getblock \" blockhash \" ( verbose )\n "
520520 " \n If verbose is false, returns a string that is serialized, hex-encoded data for block 'hash'.\n "
521521 " If verbose is true, returns an Object with information about block <hash>.\n "
522522
523523 " \n Arguments:\n "
524- " 1. \" hash \" (string, required) The block hash\n "
525- " 2. verbose (boolean, optional, default=true) true for a json object, false for the hex encoded data\n "
524+ " 1. \" blockhash \" (string, required) The block hash\n "
525+ " 2. verbose (boolean, optional, default=true) True for a json object, false for the hex encoded data\n "
526526
527527 " \n Result (for verbose = true):\n "
528528 " {\n "
@@ -588,13 +588,13 @@ UniValue getblockheader(const JSONRPCRequest& request)
588588{
589589 if (request.fHelp || request.params .size () < 1 || request.params .size () > 2 )
590590 throw std::runtime_error (
591- " getblockheader \" hash \" ( verbose )\n "
591+ " getblockheader \" blockhash \" ( verbose )\n "
592592 " \n If verbose is false, returns a string that is serialized, hex-encoded data for block 'hash' header.\n "
593593 " If verbose is true, returns an Object with information about block <hash> header.\n "
594594
595595 " \n Arguments:\n "
596- " 1. \" hash \" (string, required) The block hash\n "
597- " 2. verbose (boolean, optional, default=true) true for a json object, false for the hex encoded data\n "
596+ " 1. \" blockhash \" (string, required) The block hash\n "
597+ " 2. verbose (boolean, optional, default=true) True for a json object, false for the hex encoded data\n "
598598
599599 " \n Result (for verbose = true):\n "
600600 " {\n "
@@ -646,16 +646,16 @@ UniValue getsupplyinfo(const JSONRPCRequest& request)
646646{
647647 if (request.fHelp || request.params .size () > 1 )
648648 throw std::runtime_error (
649- " getsupplyinfo ( forceupdate )\n "
650- " \n If forceupdate =false (default if no argument is given): return the last cached money supply"
649+ " getsupplyinfo ( force_update )\n "
650+ " \n If force_update =false (default if no argument is given): return the last cached money supply"
651651 " \n (sum of spendable transaction outputs) and the height of the chain when it was last updated"
652652 " \n (it is updated periodically, whenever the chainstate is flushed)."
653653 " \n "
654- " \n If forceupdate =true: Flush the chainstate to disk and return the money supply updated to"
654+ " \n If force_update =true: Flush the chainstate to disk and return the money supply updated to"
655655 " \n the current chain height.\n "
656656
657657 " \n Arguments:\n "
658- " 1. forceupdate (boolean, optional, default=false) flush chainstate to disk and update cache\n "
658+ " 1. force_update (boolean, optional, default=false) flush chainstate to disk and update cache\n "
659659
660660 " \n Result:\n "
661661 " {\n "
@@ -796,13 +796,13 @@ UniValue gettxout(const JSONRPCRequest& request)
796796{
797797 if (request.fHelp || request.params .size () < 2 || request.params .size () > 3 )
798798 throw std::runtime_error (
799- " gettxout \" txid\" n ( includemempool )\n "
799+ " gettxout \" txid\" n ( include_mempool )\n "
800800 " \n Returns details about an unspent transaction output.\n "
801801
802802 " \n Arguments:\n "
803803 " 1. \" txid\" (string, required) The transaction id\n "
804804 " 2. n (numeric, required) vout value\n "
805- " 3. includemempool (boolean, optional) Whether to included the mem pool\n "
805+ " 3. include_mempool (boolean, optional) Whether to included the mem pool\n "
806806
807807 " \n Result:\n "
808808 " {\n "
@@ -876,11 +876,11 @@ UniValue verifychain(const JSONRPCRequest& request)
876876{
877877 if (request.fHelp || request.params .size () > 1 )
878878 throw std::runtime_error (
879- " verifychain ( numblocks )\n "
879+ " verifychain ( nblocks )\n "
880880 " \n Verifies blockchain database.\n "
881881
882882 " \n Arguments:\n "
883- " 1. numblocks (numeric, optional, default=288, 0=all) The number of blocks to check.\n "
883+ " 1. nblocks (numeric, optional, default=288, 0=all) The number of blocks to check.\n "
884884
885885 " \n Result:\n "
886886 " true|false (boolean) Verified or not\n "
@@ -1189,11 +1189,11 @@ UniValue invalidateblock(const JSONRPCRequest& request)
11891189{
11901190 if (request.fHelp || request.params .size () != 1 )
11911191 throw std::runtime_error (
1192- " invalidateblock \" hash \"\n "
1192+ " invalidateblock \" blockhash \"\n "
11931193 " \n Permanently marks a block as invalid, as if it violated a consensus rule.\n "
11941194
11951195 " \n Arguments:\n "
1196- " 1. hash (string, required) the hash of the block to mark as invalid\n "
1196+ " 1. blockhash (string, required) the hash of the block to mark as invalid\n "
11971197
11981198 " \n Examples:\n " +
11991199 HelpExampleCli (" invalidateblock" , " \" blockhash\" " ) + HelpExampleRpc (" invalidateblock" , " \" blockhash\" " ));
@@ -1229,12 +1229,12 @@ UniValue reconsiderblock(const JSONRPCRequest& request)
12291229{
12301230 if (request.fHelp || request.params .size () != 1 )
12311231 throw std::runtime_error (
1232- " reconsiderblock \" hash \"\n "
1232+ " reconsiderblock \" blockhash \"\n "
12331233 " \n Removes invalidity status of a block and its descendants, reconsider them for activation.\n "
12341234 " This can be used to undo the effects of invalidateblock.\n "
12351235
12361236 " \n Arguments:\n "
1237- " 1. hash (string, required) the hash of the block to reconsider\n "
1237+ " 1. blockhash (string, required) the hash of the block to reconsider\n "
12381238
12391239 " \n Examples:\n " +
12401240 HelpExampleCli (" reconsiderblock" , " \" blockhash\" " ) + HelpExampleRpc (" reconsiderblock" , " \" blockhash\" " ));
@@ -1300,7 +1300,7 @@ void validaterange(const UniValue& params, int& heightStart, int& heightEnd, int
13001300}
13011301
13021302UniValue getblockindexstats (const JSONRPCRequest& request) {
1303- if (request.fHelp || request.params .size () < 2 || request. params . size () > 3 )
1303+ if (request.fHelp || request.params .size () != 2 )
13041304 throw std::runtime_error (
13051305 " getblockindexstats height range\n "
13061306 " \n Returns aggregated BlockIndex data for blocks "
@@ -1441,33 +1441,33 @@ UniValue getfeeinfo(const JSONRPCRequest& request)
14411441}
14421442
14431443static const CRPCCommand commands[] =
1444- { // category name actor (function) okSafeMode
1445- // --------------------- ------------------------ ----------------------- ----------
1446- { " blockchain" , " getblockindexstats" , &getblockindexstats, true },
1447- { " blockchain" , " getblockchaininfo" , &getblockchaininfo, true },
1448- { " blockchain" , " getbestblockhash" , &getbestblockhash, true },
1449- { " blockchain" , " getbestsaplinganchor" , &getbestsaplinganchor, true },
1450- { " blockchain" , " getblockcount" , &getblockcount, true },
1451- { " blockchain" , " getblock" , &getblock, true },
1452- { " blockchain" , " getblockhash" , &getblockhash, true },
1453- { " blockchain" , " getblockheader" , &getblockheader, false },
1454- { " blockchain" , " getchaintips" , &getchaintips, true },
1455- { " blockchain" , " getdifficulty" , &getdifficulty, true },
1456- { " blockchain" , " getfeeinfo" , &getfeeinfo, true },
1457- { " blockchain" , " getmempoolinfo" , &getmempoolinfo, true },
1458- { " blockchain" , " getsupplyinfo" , &getsupplyinfo, true },
1459- { " blockchain" , " getrawmempool" , &getrawmempool, true },
1460- { " blockchain" , " gettxout" , &gettxout, true },
1461- { " blockchain" , " gettxoutsetinfo" , &gettxoutsetinfo, true },
1462- { " blockchain" , " verifychain" , &verifychain, true },
1444+ { // category name actor (function) okSafe argNames
1445+ // --------------------- ------------------------ ----------------------- ------ ---- ----
1446+ { " blockchain" , " getblockindexstats" , &getblockindexstats, true , { " height " , " range " } },
1447+ { " blockchain" , " getblockchaininfo" , &getblockchaininfo, true , {} },
1448+ { " blockchain" , " getbestblockhash" , &getbestblockhash, true , {} },
1449+ { " blockchain" , " getbestsaplinganchor" , &getbestsaplinganchor, true , {} },
1450+ { " blockchain" , " getblockcount" , &getblockcount, true , {} },
1451+ { " blockchain" , " getblock" , &getblock, true , { " blockhash " , " verbose " } },
1452+ { " blockchain" , " getblockhash" , &getblockhash, true , { " height " } },
1453+ { " blockchain" , " getblockheader" , &getblockheader, false , { " blockhash " , " verbose " } },
1454+ { " blockchain" , " getchaintips" , &getchaintips, true , {} },
1455+ { " blockchain" , " getdifficulty" , &getdifficulty, true , {} },
1456+ { " blockchain" , " getfeeinfo" , &getfeeinfo, true , { " blocks " } },
1457+ { " blockchain" , " getmempoolinfo" , &getmempoolinfo, true , {} },
1458+ { " blockchain" , " getsupplyinfo" , &getsupplyinfo, true , { " force_update " } },
1459+ { " blockchain" , " getrawmempool" , &getrawmempool, true , { " verbose " } },
1460+ { " blockchain" , " gettxout" , &gettxout, true , { " txid " , " n " , " include_mempool " } },
1461+ { " blockchain" , " gettxoutsetinfo" , &gettxoutsetinfo, true , {} },
1462+ { " blockchain" , " verifychain" , &verifychain, true , { " nblocks " } },
14631463
14641464 /* Not shown in help */
1465- { " hidden" , " invalidateblock" , &invalidateblock, true },
1466- { " hidden" , " reconsiderblock" , &reconsiderblock, true },
1467- { " hidden" , " waitfornewblock" , &waitfornewblock, true },
1468- { " hidden" , " waitforblock" , &waitforblock, true },
1469- { " hidden" , " waitforblockheight" , &waitforblockheight, true },
1470- { " hidden" , " syncwithvalidationinterfacequeue" , &syncwithvalidationinterfacequeue, true },
1465+ { " hidden" , " invalidateblock" , &invalidateblock, true , { " blockhash " } },
1466+ { " hidden" , " reconsiderblock" , &reconsiderblock, true , { " blockhash " } },
1467+ { " hidden" , " waitfornewblock" , &waitfornewblock, true , { " timeout " } },
1468+ { " hidden" , " waitforblock" , &waitforblock, true , { " blockhash " , " timeout " } },
1469+ { " hidden" , " waitforblockheight" , &waitforblockheight, true , { " height " , " timeout " } },
1470+ { " hidden" , " syncwithvalidationinterfacequeue" , &syncwithvalidationinterfacequeue, true , {} },
14711471
14721472
14731473};
0 commit comments