diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 810007b986b..880e35ee7fb 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -219,8 +219,9 @@ UniValue blockToJSON(BlockManager& blockman, const CBlock& block, const CBlockIn static RPCHelpMan getblockcount() { - return RPCHelpMan{"getblockcount", - "\nReturns the height of the most-work fully-validated chain.\n" + return RPCHelpMan{ + "getblockcount", + "Returns the height of the most-work fully-validated chain.\n" "The genesis block has height 0.\n", {}, RPCResult{ @@ -240,8 +241,9 @@ static RPCHelpMan getblockcount() static RPCHelpMan getbestblockhash() { - return RPCHelpMan{"getbestblockhash", - "\nReturns the hash of the best (tip) block in the most-work fully-validated chain.\n", + return RPCHelpMan{ + "getbestblockhash", + "Returns the hash of the best (tip) block in the most-work fully-validated chain.\n", {}, RPCResult{ RPCResult::Type::STR_HEX, "", "the block hash, hex-encoded"}, @@ -260,8 +262,9 @@ static RPCHelpMan getbestblockhash() static RPCHelpMan waitfornewblock() { - return RPCHelpMan{"waitfornewblock", - "\nWaits for any new block and returns useful info about it.\n" + return RPCHelpMan{ + "waitfornewblock", + "Waits for any new block and returns useful info about it.\n" "\nReturns the current block on timeout or exit.\n" "\nMake sure to use no RPC timeout (bitcoin-cli -rpcclienttimeout=0)", { @@ -305,8 +308,9 @@ static RPCHelpMan waitfornewblock() static RPCHelpMan waitforblock() { - return RPCHelpMan{"waitforblock", - "\nWaits for a specific new block and returns useful info about it.\n" + return RPCHelpMan{ + "waitforblock", + "Waits for a specific new block and returns useful info about it.\n" "\nReturns the current block on timeout or exit.\n" "\nMake sure to use no RPC timeout (bitcoin-cli -rpcclienttimeout=0)", { @@ -365,8 +369,9 @@ static RPCHelpMan waitforblock() static RPCHelpMan waitforblockheight() { - return RPCHelpMan{"waitforblockheight", - "\nWaits for (at least) block height and returns the height and hash\n" + return RPCHelpMan{ + "waitforblockheight", + "Waits for (at least) block height and returns the height and hash\n" "of the current tip.\n" "\nReturns the current block on timeout or exit.\n" "\nMake sure to use no RPC timeout (bitcoin-cli -rpcclienttimeout=0)", @@ -427,8 +432,9 @@ static RPCHelpMan waitforblockheight() static RPCHelpMan syncwithvalidationinterfacequeue() { - return RPCHelpMan{"syncwithvalidationinterfacequeue", - "\nWaits for the validation interface queue to catch up on everything that was there when we entered this function.\n", + return RPCHelpMan{ + "syncwithvalidationinterfacequeue", + "Waits for the validation interface queue to catch up on everything that was there when we entered this function.\n", {}, RPCResult{RPCResult::Type::NONE, "", ""}, RPCExamples{ @@ -446,8 +452,9 @@ static RPCHelpMan syncwithvalidationinterfacequeue() static RPCHelpMan getdifficulty() { - return RPCHelpMan{"getdifficulty", - "\nReturns the proof-of-work difficulty as a multiple of the minimum difficulty.\n", + return RPCHelpMan{ + "getdifficulty", + "Returns the proof-of-work difficulty as a multiple of the minimum difficulty.\n", {}, RPCResult{ RPCResult::Type::NUM, "", "the proof-of-work difficulty as a multiple of the minimum difficulty."}, @@ -521,8 +528,9 @@ static RPCHelpMan getblockfrompeer() static RPCHelpMan getblockhash() { - return RPCHelpMan{"getblockhash", - "\nReturns hash of block in best-block-chain at height provided.\n", + return RPCHelpMan{ + "getblockhash", + "Returns hash of block in best-block-chain at height provided.\n", { {"height", RPCArg::Type::NUM, RPCArg::Optional::NO, "The height index"}, }, @@ -550,8 +558,9 @@ static RPCHelpMan getblockhash() static RPCHelpMan getblockheader() { - return RPCHelpMan{"getblockheader", - "\nIf verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'.\n" + return RPCHelpMan{ + "getblockheader", + "If verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'.\n" "If verbose is true, returns an Object with information about blockheader .\n", { {"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash"}, @@ -715,8 +724,9 @@ const RPCResult getblock_vin{ static RPCHelpMan getblock() { - return RPCHelpMan{"getblock", - "\nIf verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'.\n" + return RPCHelpMan{ + "getblock", + "If verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'.\n" "If verbosity is 1, returns an Object with information about block .\n" "If verbosity is 2, returns an Object with information about block and information about each transaction.\n" "If verbosity is 3, returns an Object with information about block and information about each transaction, including prevout information for inputs (only for unpruned blocks in the current best chain).\n", @@ -954,8 +964,9 @@ static std::optional GetUTXOStats(CCoinsView* view, node::B static RPCHelpMan gettxoutsetinfo() { - return RPCHelpMan{"gettxoutsetinfo", - "\nReturns statistics about the unspent transaction output set.\n" + return RPCHelpMan{ + "gettxoutsetinfo", + "Returns statistics about the unspent transaction output set.\n" "Note this call may take some time if you are not using coinstatsindex.\n", { {"hash_type", RPCArg::Type::STR, RPCArg::Default{"hash_serialized_3"}, "Which UTXO set hash should be calculated. Options: 'hash_serialized_3' (the legacy algorithm), 'muhash', 'none'."}, @@ -1109,8 +1120,9 @@ static RPCHelpMan gettxoutsetinfo() static RPCHelpMan gettxout() { - return RPCHelpMan{"gettxout", - "\nReturns details about an unspent transaction output.\n", + return RPCHelpMan{ + "gettxout", + "Returns details about an unspent transaction output.\n", { {"txid", RPCArg::Type::STR, RPCArg::Optional::NO, "The transaction id"}, {"n", RPCArg::Type::NUM, RPCArg::Optional::NO, "vout number"}, @@ -1188,8 +1200,9 @@ static RPCHelpMan gettxout() static RPCHelpMan verifychain() { - return RPCHelpMan{"verifychain", - "\nVerifies blockchain database.\n", + return RPCHelpMan{ + "verifychain", + "Verifies blockchain database.\n", { {"checklevel", RPCArg::Type::NUM, RPCArg::DefaultHint{strprintf("%d, range=0-4", DEFAULT_CHECKLEVEL)}, strprintf("How thorough the block verification is:\n%s", MakeUnorderedList(CHECKLEVEL_DOC))}, @@ -1570,8 +1583,9 @@ static RPCHelpMan getchaintips() static RPCHelpMan preciousblock() { - return RPCHelpMan{"preciousblock", - "\nTreats a block as if it were received before others with the same work.\n" + return RPCHelpMan{ + "preciousblock", + "Treats a block as if it were received before others with the same work.\n" "\nA later preciousblock call can override the effect of an earlier one.\n" "\nThe effects of preciousblock are not retained across restarts.\n", { @@ -1631,8 +1645,9 @@ void InvalidateBlock(ChainstateManager& chainman, const uint256 block_hash) { static RPCHelpMan invalidateblock() { - return RPCHelpMan{"invalidateblock", - "\nPermanently marks a block as invalid, as if it violated a consensus rule.\n", + return RPCHelpMan{ + "invalidateblock", + "Permanently marks a block as invalid, as if it violated a consensus rule.\n", { {"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hash of the block to mark as invalid"}, }, @@ -1675,8 +1690,9 @@ void ReconsiderBlock(ChainstateManager& chainman, uint256 block_hash) { static RPCHelpMan reconsiderblock() { - return RPCHelpMan{"reconsiderblock", - "\nRemoves invalidity status of a block, its ancestors and its descendants, reconsider them for activation.\n" + return RPCHelpMan{ + "reconsiderblock", + "Removes invalidity status of a block, its ancestors and its descendants, reconsider them for activation.\n" "This can be used to undo the effects of invalidateblock.\n", { {"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hash of the block to reconsider"}, @@ -1700,8 +1716,9 @@ static RPCHelpMan reconsiderblock() static RPCHelpMan getchaintxstats() { - return RPCHelpMan{"getchaintxstats", - "\nCompute statistics about the total number and rate of transactions in the chain.\n", + return RPCHelpMan{ + "getchaintxstats", + "Compute statistics about the total number and rate of transactions in the chain.\n", { {"nblocks", RPCArg::Type::NUM, RPCArg::DefaultHint{"one month"}, "Size of the window in number of blocks"}, {"blockhash", RPCArg::Type::STR_HEX, RPCArg::DefaultHint{"chain tip"}, "The hash of the block that ends the window."}, @@ -1846,8 +1863,9 @@ static constexpr size_t PER_UTXO_OVERHEAD = sizeof(COutPoint) + sizeof(uint32_t) static RPCHelpMan getblockstats() { - return RPCHelpMan{"getblockstats", - "\nCompute per block statistics for a given window. All amounts are in satoshis.\n" + return RPCHelpMan{ + "getblockstats", + "Compute per block statistics for a given window. All amounts are in satoshis.\n" "It won't work for some heights with pruning.\n", { {"hash_or_height", RPCArg::Type::NUM, RPCArg::Optional::NO, "The block hash or height of the target block", @@ -2204,8 +2222,9 @@ static RPCHelpMan scantxoutset() // raw() descriptor corresponding to mainnet address 12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S const std::string EXAMPLE_DESCRIPTOR_RAW = "raw(76a91411b366edfc0a8b66feebae5c2e25a7b6a5d1cf3188ac)#fm24fxxy"; - return RPCHelpMan{"scantxoutset", - "\nScans the unspent transaction output set for entries that match certain output descriptors.\n" + return RPCHelpMan{ + "scantxoutset", + "Scans the unspent transaction output set for entries that match certain output descriptors.\n" "Examples of output descriptors are:\n" " addr(
) Outputs whose output script corresponds to the specified address (does not include P2PK)\n" " raw() Outputs whose output script equals the specified hex-encoded bytes\n" @@ -2415,8 +2434,9 @@ static bool CheckBlockFilterMatches(BlockManager& blockman, const CBlockIndex& b static RPCHelpMan scanblocks() { - return RPCHelpMan{"scanblocks", - "\nReturn relevant blockhashes for given descriptors (requires blockfilterindex).\n" + return RPCHelpMan{ + "scanblocks", + "Return relevant blockhashes for given descriptors (requires blockfilterindex).\n" "This call may take several minutes. Make sure to use no RPC timeout (bitcoin-cli -rpcclienttimeout=0)", { scan_action_arg_desc, @@ -2603,8 +2623,9 @@ static RPCHelpMan scanblocks() static RPCHelpMan getdescriptoractivity() { - return RPCHelpMan{"getdescriptoractivity", - "\nGet spend and receive activity associated with a set of descriptors for a set of blocks. " + return RPCHelpMan{ + "getdescriptoractivity", + "Get spend and receive activity associated with a set of descriptors for a set of blocks. " "This command pairs well with the `relevant_blocks` output of `scanblocks()`.\n" "This call may take several minutes. If you encounter timeouts, try specifying no RPC timeout (bitcoin-cli -rpcclienttimeout=0)", { @@ -2832,8 +2853,9 @@ static RPCHelpMan getdescriptoractivity() static RPCHelpMan getblockfilter() { - return RPCHelpMan{"getblockfilter", - "\nRetrieve a BIP 157 content filter for a particular block.\n", + return RPCHelpMan{ + "getblockfilter", + "Retrieve a BIP 157 content filter for a particular block.\n", { {"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The hash of the block"}, {"filtertype", RPCArg::Type::STR, RPCArg::Default{BlockFilterTypeName(BlockFilterType::BASIC)}, "The type name of the filter"}, @@ -3322,7 +3344,7 @@ static RPCHelpMan getchainstates() { return RPCHelpMan{ "getchainstates", - "\nReturn information about chainstates.\n", + "Return information about chainstates.\n", {}, RPCResult{ RPCResult::Type::OBJ, "", "", { diff --git a/src/rpc/fees.cpp b/src/rpc/fees.cpp index 10caa9ed2ec..92c7a922f28 100644 --- a/src/rpc/fees.cpp +++ b/src/rpc/fees.cpp @@ -29,8 +29,9 @@ using node::NodeContext; static RPCHelpMan estimatesmartfee() { - return RPCHelpMan{"estimatesmartfee", - "\nEstimates the approximate fee per kilobyte needed for a transaction to begin\n" + return RPCHelpMan{ + "estimatesmartfee", + "Estimates the approximate fee per kilobyte needed for a transaction to begin\n" "confirmation within conf_target blocks if possible and return the number of blocks\n" "for which the estimate is valid. Uses virtual transaction size as defined\n" "in BIP 141 (witness data is discounted).\n", @@ -96,8 +97,9 @@ static RPCHelpMan estimatesmartfee() static RPCHelpMan estimaterawfee() { - return RPCHelpMan{"estimaterawfee", - "\nWARNING: This interface is unstable and may disappear or change!\n" + return RPCHelpMan{ + "estimaterawfee", + "WARNING: This interface is unstable and may disappear or change!\n" "\nWARNING: This is an advanced API call that is tightly coupled to the specific\n" "implementation of fee estimation. The parameters it can be called with\n" "and the results it returns will change if the internal implementation changes.\n" diff --git a/src/rpc/mempool.cpp b/src/rpc/mempool.cpp index 2b883322aa1..e9bae93642c 100644 --- a/src/rpc/mempool.cpp +++ b/src/rpc/mempool.cpp @@ -41,8 +41,9 @@ using util::ToString; static RPCHelpMan sendrawtransaction() { - return RPCHelpMan{"sendrawtransaction", - "\nSubmit a raw transaction (serialized, hex-encoded) to local node and network.\n" + return RPCHelpMan{ + "sendrawtransaction", + "Submit a raw transaction (serialized, hex-encoded) to local node and network.\n" "\nThe transaction will be sent unconditionally to all peers, so using sendrawtransaction\n" "for manual rebroadcast may degrade privacy by leaking the transaction's origin, as\n" "nodes will normally not rebroadcast non-wallet transactions already in their mempool.\n" @@ -108,8 +109,9 @@ static RPCHelpMan sendrawtransaction() static RPCHelpMan testmempoolaccept() { - return RPCHelpMan{"testmempoolaccept", - "\nReturns result of mempool acceptance tests indicating if raw transaction(s) (serialized, hex-encoded) would be accepted by mempool.\n" + return RPCHelpMan{ + "testmempoolaccept", + "Returns result of mempool acceptance tests indicating if raw transaction(s) (serialized, hex-encoded) would be accepted by mempool.\n" "\nIf multiple transactions are passed in, parents must come before children and package policies apply: the transactions cannot conflict with any mempool transactions or each other.\n" "\nIf one transaction fails, other transactions may not be fully validated (the 'allowed' key will be blank).\n" "\nThe maximum number of transactions allowed is " + ToString(MAX_PACKAGE_COUNT) + ".\n" @@ -381,8 +383,9 @@ UniValue MempoolToJSON(const CTxMemPool& pool, bool verbose, bool include_mempoo static RPCHelpMan getrawmempool() { - return RPCHelpMan{"getrawmempool", - "\nReturns all transaction ids in memory pool as a json array of string transaction ids.\n" + return RPCHelpMan{ + "getrawmempool", + "Returns all transaction ids in memory pool as a json array of string transaction ids.\n" "\nHint: use getmempoolentry to fetch a specific transaction from the mempool.\n", { {"verbose", RPCArg::Type::BOOL, RPCArg::Default{false}, "True for a json object, false for array of transaction ids"}, @@ -431,8 +434,9 @@ static RPCHelpMan getrawmempool() static RPCHelpMan getmempoolancestors() { - return RPCHelpMan{"getmempoolancestors", - "\nIf txid is in the mempool, returns all in-mempool ancestors.\n", + return RPCHelpMan{ + "getmempoolancestors", + "If txid is in the mempool, returns all in-mempool ancestors.\n", { {"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id (must be in mempool)"}, {"verbose", RPCArg::Type::BOOL, RPCArg::Default{false}, "True for a json object, false for array of transaction ids"}, @@ -492,8 +496,9 @@ static RPCHelpMan getmempoolancestors() static RPCHelpMan getmempooldescendants() { - return RPCHelpMan{"getmempooldescendants", - "\nIf txid is in the mempool, returns all in-mempool descendants.\n", + return RPCHelpMan{ + "getmempooldescendants", + "If txid is in the mempool, returns all in-mempool descendants.\n", { {"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id (must be in mempool)"}, {"verbose", RPCArg::Type::BOOL, RPCArg::Default{false}, "True for a json object, false for array of transaction ids"}, @@ -557,8 +562,9 @@ static RPCHelpMan getmempooldescendants() static RPCHelpMan getmempoolentry() { - return RPCHelpMan{"getmempoolentry", - "\nReturns mempool data for given transaction\n", + return RPCHelpMan{ + "getmempoolentry", + "Returns mempool data for given transaction\n", { {"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The transaction id (must be in mempool)"}, }, @@ -782,8 +788,9 @@ static RPCHelpMan importmempool() static RPCHelpMan savemempool() { - return RPCHelpMan{"savemempool", - "\nDumps the mempool to disk. It will fail until the previous dump is fully loaded.\n", + return RPCHelpMan{ + "savemempool", + "Dumps the mempool to disk. It will fail until the previous dump is fully loaded.\n", {}, RPCResult{ RPCResult::Type::OBJ, "", "", @@ -854,8 +861,9 @@ static UniValue OrphanToJSON(const TxOrphanage::OrphanTxBase& orphan) static RPCHelpMan getorphantxs() { - return RPCHelpMan{"getorphantxs", - "\nShows transactions in the tx orphanage.\n" + return RPCHelpMan{ + "getorphantxs", + "Shows transactions in the tx orphanage.\n" "\nEXPERIMENTAL warning: this call may be changed in future releases.\n", { {"verbosity", RPCArg::Type::NUM, RPCArg::Default{0}, "0 for an array of txids (may contain duplicates), 1 for an array of objects with tx details, and 2 for details from (1) and tx hex", diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 0a3911d30aa..aa68ae324dd 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -110,8 +110,9 @@ static UniValue GetNetworkHashPS(int lookup, int height, const CChain& active_ch static RPCHelpMan getnetworkhashps() { - return RPCHelpMan{"getnetworkhashps", - "\nReturns the estimated network hashes per second based on the last n blocks.\n" + return RPCHelpMan{ + "getnetworkhashps", + "Returns the estimated network hashes per second based on the last n blocks.\n" "Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change.\n" "Pass in [height] to estimate the network speed at the time when a certain block was found.\n", { @@ -414,8 +415,9 @@ static RPCHelpMan generateblock() static RPCHelpMan getmininginfo() { - return RPCHelpMan{"getmininginfo", - "\nReturns a json object containing mining-related information.", + return RPCHelpMan{ + "getmininginfo", + "Returns a json object containing mining-related information.", {}, RPCResult{ RPCResult::Type::OBJ, "", "", @@ -608,8 +610,9 @@ static std::string gbt_rule_value(const std::string& name, bool gbt_optional_rul static RPCHelpMan getblocktemplate() { - return RPCHelpMan{"getblocktemplate", - "\nIf the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'.\n" + return RPCHelpMan{ + "getblocktemplate", + "If the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'.\n" "It returns data needed to construct a block to work on.\n" "For full specification, see BIPs 22, 23, 9, and 145:\n" " https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki\n" @@ -1045,8 +1048,9 @@ protected: static RPCHelpMan submitblock() { // We allow 2 arguments for compliance with BIP22. Argument 2 is ignored. - return RPCHelpMan{"submitblock", - "\nAttempts to submit new block to network.\n" + return RPCHelpMan{ + "submitblock", + "Attempts to submit new block to network.\n" "See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n", { {"hexdata", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hex-encoded block data to submit"}, @@ -1095,8 +1099,9 @@ static RPCHelpMan submitblock() static RPCHelpMan submitheader() { - return RPCHelpMan{"submitheader", - "\nDecode the given hexdata as a header and submit it as a candidate chain tip if valid." + return RPCHelpMan{ + "submitheader", + "Decode the given hexdata as a header and submit it as a candidate chain tip if valid." "\nThrows when the header is invalid.\n", { {"hexdata", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hex-encoded block header data"}, diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 3a5b8abdf26..d46e3e99132 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -56,8 +56,9 @@ const std::vector TRANSPORT_TYPE_DOC{ static RPCHelpMan getconnectioncount() { - return RPCHelpMan{"getconnectioncount", - "\nReturns the number of connections to other nodes.\n", + return RPCHelpMan{ + "getconnectioncount", + "Returns the number of connections to other nodes.\n", {}, RPCResult{ RPCResult::Type::NUM, "", "The connection count" @@ -78,8 +79,9 @@ static RPCHelpMan getconnectioncount() static RPCHelpMan ping() { - return RPCHelpMan{"ping", - "\nRequests that a ping be sent to all other nodes, to measure ping time.\n" + return RPCHelpMan{ + "ping", + "Requests that a ping be sent to all other nodes, to measure ping time.\n" "Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds.\n" "Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.\n", {}, @@ -304,8 +306,9 @@ static RPCHelpMan getpeerinfo() static RPCHelpMan addnode() { - return RPCHelpMan{"addnode", - "\nAttempts to add or remove a node from the addnode list.\n" + return RPCHelpMan{ + "addnode", + "Attempts to add or remove a node from the addnode list.\n" "Or try a connection to a node once.\n" "Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be\n" "full nodes/support SegWit as other outbound peers are (though such peers will not be synced from).\n" + @@ -367,8 +370,9 @@ static RPCHelpMan addnode() static RPCHelpMan addconnection() { - return RPCHelpMan{"addconnection", - "\nOpen an outbound connection to a specified node. This RPC is for testing only.\n", + return RPCHelpMan{ + "addconnection", + "Open an outbound connection to a specified node. This RPC is for testing only.\n", { {"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The IP address and port to attempt connecting to."}, {"connection_type", RPCArg::Type::STR, RPCArg::Optional::NO, "Type of connection to open (\"outbound-full-relay\", \"block-relay-only\", \"addr-fetch\" or \"feeler\")."}, @@ -429,8 +433,9 @@ static RPCHelpMan addconnection() static RPCHelpMan disconnectnode() { - return RPCHelpMan{"disconnectnode", - "\nImmediately disconnects from the specified peer node.\n" + return RPCHelpMan{ + "disconnectnode", + "Immediately disconnects from the specified peer node.\n" "\nStrictly one out of 'address' and 'nodeid' can be provided to identify the node.\n" "\nTo disconnect by nodeid, either set 'address' to the empty string, or call using the named 'nodeid' argument only.\n", { @@ -475,8 +480,9 @@ static RPCHelpMan disconnectnode() static RPCHelpMan getaddednodeinfo() { - return RPCHelpMan{"getaddednodeinfo", - "\nReturns information about the given added node, or all added nodes\n" + return RPCHelpMan{ + "getaddednodeinfo", + "Returns information about the given added node, or all added nodes\n" "(note that onetry addnodes are not listed here)\n", { {"node", RPCArg::Type::STR, RPCArg::DefaultHint{"all nodes"}, "If provided, return information about this specific node, otherwise all nodes are returned."}, @@ -724,8 +730,9 @@ static RPCHelpMan getnetworkinfo() static RPCHelpMan setban() { - return RPCHelpMan{"setban", - "\nAttempts to add or remove an IP/Subnet from the banned list.\n", + return RPCHelpMan{ + "setban", + "Attempts to add or remove an IP/Subnet from the banned list.\n", { {"subnet", RPCArg::Type::STR, RPCArg::Optional::NO, "The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask (default is /32 = single IP)"}, {"command", RPCArg::Type::STR, RPCArg::Optional::NO, "'add' to add an IP/Subnet to the list, 'remove' to remove an IP/Subnet from the list"}, @@ -809,8 +816,9 @@ static RPCHelpMan setban() static RPCHelpMan listbanned() { - return RPCHelpMan{"listbanned", - "\nList all manually banned IPs/Subnets.\n", + return RPCHelpMan{ + "listbanned", + "List all manually banned IPs/Subnets.\n", {}, RPCResult{RPCResult::Type::ARR, "", "", { @@ -856,8 +864,9 @@ static RPCHelpMan listbanned() static RPCHelpMan clearbanned() { - return RPCHelpMan{"clearbanned", - "\nClear all banned IPs.\n", + return RPCHelpMan{ + "clearbanned", + "Clear all banned IPs.\n", {}, RPCResult{RPCResult::Type::NONE, "", ""}, RPCExamples{ @@ -877,8 +886,9 @@ static RPCHelpMan clearbanned() static RPCHelpMan setnetworkactive() { - return RPCHelpMan{"setnetworkactive", - "\nDisable/enable all p2p network activity.\n", + return RPCHelpMan{ + "setnetworkactive", + "Disable/enable all p2p network activity.\n", { {"state", RPCArg::Type::BOOL, RPCArg::Optional::NO, "true to enable networking, false to disable"}, }, @@ -1067,7 +1077,7 @@ static RPCHelpMan getaddrmaninfo() { return RPCHelpMan{ "getaddrmaninfo", - "\nProvides information about the node's address manager by returning the number of " + "Provides information about the node's address manager by returning the number of " "addresses in the `new` and `tried` tables and their sum for all networks.\n", {}, RPCResult{ diff --git a/src/rpc/node.cpp b/src/rpc/node.cpp index 5e36273cf49..3610d87fdf4 100644 --- a/src/rpc/node.cpp +++ b/src/rpc/node.cpp @@ -35,8 +35,9 @@ using node::NodeContext; static RPCHelpMan setmocktime() { - return RPCHelpMan{"setmocktime", - "\nSet the local time to given timestamp (-regtest only)\n", + return RPCHelpMan{ + "setmocktime", + "Set the local time to given timestamp (-regtest only)\n", { {"timestamp", RPCArg::Type::NUM, RPCArg::Optional::NO, UNIX_EPOCH_TIME + "\n" "Pass 0 to go back to using the system time."}, @@ -75,8 +76,9 @@ static RPCHelpMan setmocktime() static RPCHelpMan mockscheduler() { - return RPCHelpMan{"mockscheduler", - "\nBump the scheduler into the future (-regtest only)\n", + return RPCHelpMan{ + "mockscheduler", + "Bump the scheduler into the future (-regtest only)\n", { {"delta_time", RPCArg::Type::NUM, RPCArg::Optional::NO, "Number of seconds to forward the scheduler into the future." }, }, @@ -308,7 +310,7 @@ static RPCHelpMan echoipc() { return RPCHelpMan{ "echoipc", - "\nEcho back the input argument, passing it through a spawned process in a multiprocess build.\n" + "Echo back the input argument, passing it through a spawned process in a multiprocess build.\n" "This command is for testing.\n", {{"arg", RPCArg::Type::STR, RPCArg::Optional::NO, "The string to echo",}}, RPCResult{RPCResult::Type::STR, "echo", "The echoed string."}, @@ -356,8 +358,9 @@ static UniValue SummaryToJSON(const IndexSummary&& summary, std::string index_na static RPCHelpMan getindexinfo() { - return RPCHelpMan{"getindexinfo", - "\nReturns the status of one or all available indices currently running in the node.\n", + return RPCHelpMan{ + "getindexinfo", + "Returns the status of one or all available indices currently running in the node.\n", { {"index_name", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Filter results for an index with a specific name."}, }, diff --git a/src/rpc/output_script.cpp b/src/rpc/output_script.cpp index 5de2847be99..e5458278122 100644 --- a/src/rpc/output_script.cpp +++ b/src/rpc/output_script.cpp @@ -29,7 +29,7 @@ static RPCHelpMan validateaddress() { return RPCHelpMan{ "validateaddress", - "\nReturn information about the given bitcoin address.\n", + "Return information about the given bitcoin address.\n", { {"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The bitcoin address to validate"}, }, @@ -87,8 +87,9 @@ static RPCHelpMan validateaddress() static RPCHelpMan createmultisig() { - return RPCHelpMan{"createmultisig", - "\nCreates a multi-signature address with n signature of m keys required.\n" + return RPCHelpMan{ + "createmultisig", + "Creates a multi-signature address with n signature of m keys required.\n" "It returns a json object with the address and redeemScript.\n", { {"nrequired", RPCArg::Type::NUM, RPCArg::Optional::NO, "The number of required signatures out of the n keys."}, diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index de0ee601584..106e761652c 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -411,8 +411,9 @@ static RPCHelpMan getrawtransaction() static RPCHelpMan createrawtransaction() { - return RPCHelpMan{"createrawtransaction", - "\nCreate a transaction spending the given inputs and creating new outputs.\n" + return RPCHelpMan{ + "createrawtransaction", + "Create a transaction spending the given inputs and creating new outputs.\n" "Outputs can be addresses or data.\n" "Returns hex-encoded raw transaction.\n" "Note that the transaction's inputs are not signed, and\n" @@ -485,7 +486,7 @@ static RPCHelpMan decodescript() { return RPCHelpMan{ "decodescript", - "\nDecode a hex-encoded script.\n", + "Decode a hex-encoded script.\n", { {"hexstring", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hex-encoded script"}, }, @@ -618,8 +619,9 @@ static RPCHelpMan decodescript() static RPCHelpMan combinerawtransaction() { - return RPCHelpMan{"combinerawtransaction", - "\nCombine multiple partially signed transactions into one transaction.\n" + return RPCHelpMan{ + "combinerawtransaction", + "Combine multiple partially signed transactions into one transaction.\n" "The combined transaction may be another partially signed transaction or a \n" "fully signed transaction.", { @@ -704,8 +706,9 @@ static RPCHelpMan combinerawtransaction() static RPCHelpMan signrawtransactionwithkey() { - return RPCHelpMan{"signrawtransactionwithkey", - "\nSign inputs for raw transaction (serialized, hex-encoded).\n" + return RPCHelpMan{ + "signrawtransactionwithkey", + "Sign inputs for raw transaction (serialized, hex-encoded).\n" "The second argument is an array of base58-encoded private\n" "keys that will be the only keys used to sign the transaction.\n" "The third optional argument (may be null) is an array of previous transaction outputs that\n" @@ -1548,8 +1551,9 @@ static RPCHelpMan decodepsbt() static RPCHelpMan combinepsbt() { - return RPCHelpMan{"combinepsbt", - "\nCombine multiple partially signed Bitcoin transactions into one transaction.\n" + return RPCHelpMan{ + "combinepsbt", + "Combine multiple partially signed Bitcoin transactions into one transaction.\n" "Implements the Combiner role.\n", { {"txs", RPCArg::Type::ARR, RPCArg::Optional::NO, "The base64 strings of partially signed transactions", @@ -1652,8 +1656,9 @@ static RPCHelpMan finalizepsbt() static RPCHelpMan createpsbt() { - return RPCHelpMan{"createpsbt", - "\nCreates a transaction in the Partially Signed Transaction format.\n" + return RPCHelpMan{ + "createpsbt", + "Creates a transaction in the Partially Signed Transaction format.\n" "Implements the Creator role.\n" "Note that the transaction's inputs are not signed, and\n" "it is not stored in the wallet or transmitted to the network.\n", @@ -1694,8 +1699,9 @@ static RPCHelpMan createpsbt() static RPCHelpMan converttopsbt() { - return RPCHelpMan{"converttopsbt", - "\nConverts a network serialized transaction to a PSBT. This should be used only with createrawtransaction and fundrawtransaction\n" + return RPCHelpMan{ + "converttopsbt", + "Converts a network serialized transaction to a PSBT. This should be used only with createrawtransaction and fundrawtransaction\n" "createpsbt and walletcreatefundedpsbt should be used for new applications.\n", { {"hexstring", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The hex string of a raw transaction"}, @@ -1761,8 +1767,9 @@ static RPCHelpMan converttopsbt() static RPCHelpMan utxoupdatepsbt() { - return RPCHelpMan{"utxoupdatepsbt", - "\nUpdates all segwit inputs and outputs in a PSBT with data from output descriptors, the UTXO set, txindex, or the mempool.\n", + return RPCHelpMan{ + "utxoupdatepsbt", + "Updates all segwit inputs and outputs in a PSBT with data from output descriptors, the UTXO set, txindex, or the mempool.\n", { {"psbt", RPCArg::Type::STR, RPCArg::Optional::NO, "A base64 string of a PSBT"}, {"descriptors", RPCArg::Type::ARR, RPCArg::Optional::OMITTED, "An array of either strings or objects", { @@ -1807,8 +1814,9 @@ static RPCHelpMan utxoupdatepsbt() static RPCHelpMan joinpsbts() { - return RPCHelpMan{"joinpsbts", - "\nJoins multiple distinct PSBTs with different inputs and outputs into one PSBT with inputs and outputs from all of the PSBTs\n" + return RPCHelpMan{ + "joinpsbts", + "Joins multiple distinct PSBTs with different inputs and outputs into one PSBT with inputs and outputs from all of the PSBTs\n" "No input in any of the PSBTs can be in more than one of the PSBTs.\n", { {"txs", RPCArg::Type::ARR, RPCArg::Optional::NO, "The base64 strings of partially signed transactions", @@ -1908,8 +1916,9 @@ static RPCHelpMan joinpsbts() static RPCHelpMan analyzepsbt() { - return RPCHelpMan{"analyzepsbt", - "\nAnalyzes and provides information about the current status of a PSBT and its inputs\n", + return RPCHelpMan{ + "analyzepsbt", + "Analyzes and provides information about the current status of a PSBT and its inputs\n", { {"psbt", RPCArg::Type::STR, RPCArg::Optional::NO, "A base64 string of a PSBT"} }, @@ -2017,8 +2026,9 @@ static RPCHelpMan analyzepsbt() RPCHelpMan descriptorprocesspsbt() { - return RPCHelpMan{"descriptorprocesspsbt", - "\nUpdate all segwit inputs in a PSBT with information from output descriptors, the UTXO set or the mempool. \n" + return RPCHelpMan{ + "descriptorprocesspsbt", + "Update all segwit inputs in a PSBT with information from output descriptors, the UTXO set or the mempool. \n" "Then, sign the inputs we are able to with information from the output descriptors. ", { {"psbt", RPCArg::Type::STR, RPCArg::Optional::NO, "The transaction base64 string"}, diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 34f19df2564..55d828d6fe2 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -126,8 +126,9 @@ std::string CRPCTable::help(const std::string& strCommand, const JSONRPCRequest& static RPCHelpMan help() { - return RPCHelpMan{"help", - "\nList all commands, or get help for a specified command.\n", + return RPCHelpMan{ + "help", + "List all commands, or get help for a specified command.\n", { {"command", RPCArg::Type::STR, RPCArg::DefaultHint{"all commands"}, "The command to get help on"}, }, @@ -180,8 +181,9 @@ static RPCHelpMan stop() static RPCHelpMan uptime() { - return RPCHelpMan{"uptime", - "\nReturns the total uptime of the server.\n", + return RPCHelpMan{ + "uptime", + "Returns the total uptime of the server.\n", {}, RPCResult{ RPCResult::Type::NUM, "", "The number of seconds that the server has been running" @@ -199,8 +201,9 @@ static RPCHelpMan uptime() static RPCHelpMan getrpcinfo() { - return RPCHelpMan{"getrpcinfo", - "\nReturns details of the RPC server.\n", + return RPCHelpMan{ + "getrpcinfo", + "Returns details of the RPC server.\n", {}, RPCResult{ RPCResult::Type::OBJ, "", "", diff --git a/src/rpc/signmessage.cpp b/src/rpc/signmessage.cpp index 83462738c5b..5597f8d237e 100644 --- a/src/rpc/signmessage.cpp +++ b/src/rpc/signmessage.cpp @@ -63,8 +63,9 @@ static RPCHelpMan verifymessage() static RPCHelpMan signmessagewithprivkey() { - return RPCHelpMan{"signmessagewithprivkey", - "\nSign a message with the private key of an address\n", + return RPCHelpMan{ + "signmessagewithprivkey", + "Sign a message with the private key of an address\n", { {"privkey", RPCArg::Type::STR, RPCArg::Optional::NO, "The private key to sign the message with."}, {"message", RPCArg::Type::STR, RPCArg::Optional::NO, "The message to create a signature of."}, diff --git a/src/rpc/txoutproof.cpp b/src/rpc/txoutproof.cpp index 77fd22000c4..a45e43819da 100644 --- a/src/rpc/txoutproof.cpp +++ b/src/rpc/txoutproof.cpp @@ -22,8 +22,9 @@ using node::GetTransaction; static RPCHelpMan gettxoutproof() { - return RPCHelpMan{"gettxoutproof", - "\nReturns a hex-encoded proof that \"txid\" was included in a block.\n" + return RPCHelpMan{ + "gettxoutproof", + "Returns a hex-encoded proof that \"txid\" was included in a block.\n" "\nNOTE: By default this function only works sometimes. This is when there is an\n" "unspent output in the utxo for this transaction. To make it always work,\n" "you need to maintain a transaction index, using the -txindex command line option or\n" @@ -127,8 +128,9 @@ static RPCHelpMan gettxoutproof() static RPCHelpMan verifytxoutproof() { - return RPCHelpMan{"verifytxoutproof", - "\nVerifies that a proof points to a transaction in a block, returning the transaction it commits to\n" + return RPCHelpMan{ + "verifytxoutproof", + "Verifies that a proof points to a transaction in a block, returning the transaction it commits to\n" "and throwing an RPC error if the block is not in our best chain\n", { {"proof", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The hex-encoded proof generated by gettxoutproof"}, diff --git a/src/wallet/rpc/addresses.cpp b/src/wallet/rpc/addresses.cpp index 88dee8f9014..39df2166bef 100644 --- a/src/wallet/rpc/addresses.cpp +++ b/src/wallet/rpc/addresses.cpp @@ -20,8 +20,9 @@ namespace wallet { RPCHelpMan getnewaddress() { - return RPCHelpMan{"getnewaddress", - "\nReturns a new Bitcoin address for receiving payments.\n" + return RPCHelpMan{ + "getnewaddress", + "Returns a new Bitcoin address for receiving payments.\n" "If 'label' is specified, it is added to the address book \n" "so payments received with the address will be associated with 'label'.\n", { @@ -70,8 +71,9 @@ RPCHelpMan getnewaddress() RPCHelpMan getrawchangeaddress() { - return RPCHelpMan{"getrawchangeaddress", - "\nReturns a new Bitcoin address, for receiving change.\n" + return RPCHelpMan{ + "getrawchangeaddress", + "Returns a new Bitcoin address, for receiving change.\n" "This is for use with raw transactions, NOT normal use.\n", { {"address_type", RPCArg::Type::STR, RPCArg::DefaultHint{"set by -changetype"}, "The address type to use. Options are \"legacy\", \"p2sh-segwit\", \"bech32\", and \"bech32m\"."}, @@ -115,8 +117,9 @@ RPCHelpMan getrawchangeaddress() RPCHelpMan setlabel() { - return RPCHelpMan{"setlabel", - "\nSets the label associated with the given address.\n", + return RPCHelpMan{ + "setlabel", + "Sets the label associated with the given address.\n", { {"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The bitcoin address to be associated with a label."}, {"label", RPCArg::Type::STR, RPCArg::Optional::NO, "The label to assign to the address."}, @@ -153,8 +156,9 @@ RPCHelpMan setlabel() RPCHelpMan listaddressgroupings() { - return RPCHelpMan{"listaddressgroupings", - "\nLists groups of addresses which have had their common ownership\n" + return RPCHelpMan{ + "listaddressgroupings", + "Lists groups of addresses which have had their common ownership\n" "made public by common use as inputs or as the resulting change\n" "in past transactions\n", {}, @@ -362,8 +366,9 @@ static UniValue DescribeWalletAddress(const CWallet& wallet, const CTxDestinatio RPCHelpMan getaddressinfo() { - return RPCHelpMan{"getaddressinfo", - "\nReturn information about the given bitcoin address.\n" + return RPCHelpMan{ + "getaddressinfo", + "Return information about the given bitcoin address.\n" "Some of the information will only be present if the address is in the active wallet.\n", { {"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The bitcoin address for which to get information."}, @@ -508,8 +513,9 @@ RPCHelpMan getaddressinfo() RPCHelpMan getaddressesbylabel() { - return RPCHelpMan{"getaddressesbylabel", - "\nReturns the list of addresses assigned the specified label.\n", + return RPCHelpMan{ + "getaddressesbylabel", + "Returns the list of addresses assigned the specified label.\n", { {"label", RPCArg::Type::STR, RPCArg::Optional::NO, "The label."}, }, @@ -568,8 +574,9 @@ RPCHelpMan getaddressesbylabel() RPCHelpMan listlabels() { - return RPCHelpMan{"listlabels", - "\nReturns the list of all labels, or labels that are assigned to addresses with a specific purpose.\n", + return RPCHelpMan{ + "listlabels", + "Returns the list of all labels, or labels that are assigned to addresses with a specific purpose.\n", { {"purpose", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Address purpose to list labels for ('send','receive'). An empty string is the same as not providing this argument."}, }, diff --git a/src/wallet/rpc/backup.cpp b/src/wallet/rpc/backup.cpp index d5b1ddb9fb5..c00a65f8d6c 100644 --- a/src/wallet/rpc/backup.cpp +++ b/src/wallet/rpc/backup.cpp @@ -36,8 +36,9 @@ using interfaces::FoundBlock; namespace wallet { RPCHelpMan importprunedfunds() { - return RPCHelpMan{"importprunedfunds", - "\nImports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.\n", + return RPCHelpMan{ + "importprunedfunds", + "Imports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.\n", { {"rawtransaction", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "A raw transaction in hex funding an already-existing address in wallet"}, {"txoutproof", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The hex output from gettxoutproof that contains the transaction"}, @@ -92,8 +93,9 @@ RPCHelpMan importprunedfunds() RPCHelpMan removeprunedfunds() { - return RPCHelpMan{"removeprunedfunds", - "\nDeletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances.\n", + return RPCHelpMan{ + "removeprunedfunds", + "Deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances.\n", { {"txid", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The hex-encoded id of the transaction you are deleting"}, }, @@ -297,8 +299,9 @@ static UniValue ProcessDescriptorImport(CWallet& wallet, const UniValue& data, c RPCHelpMan importdescriptors() { - return RPCHelpMan{"importdescriptors", - "\nImport descriptors. This will trigger a rescan of the blockchain based on the earliest timestamp of all descriptors being imported. Requires a new wallet backup.\n" + return RPCHelpMan{ + "importdescriptors", + "Import descriptors. This will trigger a rescan of the blockchain based on the earliest timestamp of all descriptors being imported. Requires a new wallet backup.\n" "When importing descriptors with multipath key expressions, if the multipath specifier contains exactly two elements, the descriptor produced from the second elements will be imported as an internal descriptor.\n" "\nNote: This call can take over an hour to complete if using an early timestamp; during that time, other rpc calls\n" "may report that the imported keys, addresses or scripts exist but related transactions are still missing.\n" @@ -464,7 +467,7 @@ RPCHelpMan listdescriptors() { return RPCHelpMan{ "listdescriptors", - "\nList descriptors imported into a descriptor-enabled wallet.\n", + "List descriptors imported into a descriptor-enabled wallet.\n", { {"private", RPCArg::Type::BOOL, RPCArg::Default{false}, "Show private descriptors."} }, @@ -575,8 +578,9 @@ RPCHelpMan listdescriptors() RPCHelpMan backupwallet() { - return RPCHelpMan{"backupwallet", - "\nSafely copies the current wallet file to the specified destination, which can either be a directory or a path with a filename.\n", + return RPCHelpMan{ + "backupwallet", + "Safely copies the current wallet file to the specified destination, which can either be a directory or a path with a filename.\n", { {"destination", RPCArg::Type::STR, RPCArg::Optional::NO, "The destination directory or file"}, }, @@ -611,7 +615,7 @@ RPCHelpMan restorewallet() { return RPCHelpMan{ "restorewallet", - "\nRestores and loads a wallet from backup.\n" + "Restores and loads a wallet from backup.\n" "\nThe rescan is significantly faster if a descriptor wallet is restored" "\nand block filters are available (using startup option \"-blockfilterindex=1\").\n", { diff --git a/src/wallet/rpc/coins.cpp b/src/wallet/rpc/coins.cpp index da777c9c211..e931d0cfba1 100644 --- a/src/wallet/rpc/coins.cpp +++ b/src/wallet/rpc/coins.cpp @@ -80,8 +80,9 @@ static CAmount GetReceived(const CWallet& wallet, const UniValue& params, bool b RPCHelpMan getreceivedbyaddress() { - return RPCHelpMan{"getreceivedbyaddress", - "\nReturns the total amount received by the given address in transactions with at least minconf confirmations.\n", + return RPCHelpMan{ + "getreceivedbyaddress", + "Returns the total amount received by the given address in transactions with at least minconf confirmations.\n", { {"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The bitcoin address for transactions."}, {"minconf", RPCArg::Type::NUM, RPCArg::Default{1}, "Only include transactions confirmed at least this many times."}, @@ -121,8 +122,9 @@ RPCHelpMan getreceivedbyaddress() RPCHelpMan getreceivedbylabel() { - return RPCHelpMan{"getreceivedbylabel", - "\nReturns the total amount received by addresses with