Skip to content

Commit 7ae8964

Browse files
committed
[Refactor] Sort RPC command tables alphabetically
1 parent da63bb8 commit 7ae8964

File tree

8 files changed

+145
-144
lines changed

8 files changed

+145
-144
lines changed

src/rpc/blockchain.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,30 +1443,30 @@ UniValue getfeeinfo(const JSONRPCRequest& request)
14431443
static const CRPCCommand commands[] =
14441444
{ // category name actor (function) okSafe argNames
14451445
// --------------------- ------------------------ ----------------------- ------ --------
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, {} },
1446+
{ "blockchain", "getbestblockhash", &getbestblockhash, true, {} },
1447+
{ "blockchain", "getbestsaplinganchor", &getbestsaplinganchor, true, {} },
14511448
{ "blockchain", "getblock", &getblock, true, {"blockhash","verbose"} },
1449+
{ "blockchain", "getblockchaininfo", &getblockchaininfo, true, {} },
1450+
{ "blockchain", "getblockcount", &getblockcount, true, {} },
14521451
{ "blockchain", "getblockhash", &getblockhash, true, {"height"} },
14531452
{ "blockchain", "getblockheader", &getblockheader, false, {"blockhash","verbose"} },
1454-
{ "blockchain", "getchaintips", &getchaintips, true, {} },
1455-
{ "blockchain", "getdifficulty", &getdifficulty, true, {} },
1453+
{ "blockchain", "getblockindexstats", &getblockindexstats, true, {"height","range"} },
1454+
{ "blockchain", "getchaintips", &getchaintips, true, {} },
1455+
{ "blockchain", "getdifficulty", &getdifficulty, true, {} },
14561456
{ "blockchain", "getfeeinfo", &getfeeinfo, true, {"blocks"} },
1457-
{ "blockchain", "getmempoolinfo", &getmempoolinfo, true, {} },
1458-
{ "blockchain", "getsupplyinfo", &getsupplyinfo, true, {"force_update"} },
1457+
{ "blockchain", "getmempoolinfo", &getmempoolinfo, true, {} },
14591458
{ "blockchain", "getrawmempool", &getrawmempool, true, {"verbose"} },
1459+
{ "blockchain", "getsupplyinfo", &getsupplyinfo, true, {"force_update"} },
14601460
{ "blockchain", "gettxout", &gettxout, true, {"txid","n","include_mempool"} },
1461-
{ "blockchain", "gettxoutsetinfo", &gettxoutsetinfo, true, {} },
1461+
{ "blockchain", "gettxoutsetinfo", &gettxoutsetinfo, true, {} },
14621462
{ "blockchain", "verifychain", &verifychain, true, {"nblocks"} },
14631463

14641464
/* Not shown in help */
14651465
{ "hidden", "invalidateblock", &invalidateblock, true, {"blockhash"} },
14661466
{ "hidden", "reconsiderblock", &reconsiderblock, true, {"blockhash"} },
1467-
{ "hidden", "waitfornewblock", &waitfornewblock, true, {"timeout"} },
14681467
{ "hidden", "waitforblock", &waitforblock, true, {"blockhash","timeout"} },
14691468
{ "hidden", "waitforblockheight", &waitforblockheight, true, {"height","timeout"} },
1469+
{ "hidden", "waitfornewblock", &waitfornewblock, true, {"timeout"} },
14701470
{ "hidden", "syncwithvalidationinterfacequeue", &syncwithvalidationinterfacequeue, true, {} },
14711471

14721472

src/rpc/budget.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -867,16 +867,16 @@ UniValue checkbudgets(const JSONRPCRequest& request)
867867
static const CRPCCommand commands[] =
868868
{ // category name actor (function) okSafe argNames
869869
// --------------------- ------------------------ ----------------------- ------ --------
870-
{ "budget", "preparebudget", &preparebudget, true, {"name","url","npayments","start","address","monthly_payment"} },
871-
{ "budget", "submitbudget", &submitbudget, true, {"name","url","npayments","start","address","monthly_payment","fee_txid"} },
872-
{ "budget", "mnbudgetvote", &mnbudgetvote, true, {"mode","hash","votecast","alias","legacy"} },
870+
{ "budget", "checkbudgets", &checkbudgets, true, {} },
871+
{ "budget", "getbudgetinfo", &getbudgetinfo, true, {"name"} },
872+
{ "budget", "getbudgetprojection", &getbudgetprojection, true, {} },
873873
{ "budget", "getbudgetvotes", &getbudgetvotes, true, {"name"} },
874874
{ "budget", "getnextsuperblock", &getnextsuperblock, true, {} },
875-
{ "budget", "getbudgetprojection", &getbudgetprojection, true, {} },
876-
{ "budget", "getbudgetinfo", &getbudgetinfo, true, {"name"} },
877875
{ "budget", "mnbudgetrawvote", &mnbudgetrawvote, true, {"collat_txid","collat_vout","hash","votecast","time","sig"} },
876+
{ "budget", "mnbudgetvote", &mnbudgetvote, true, {"mode","hash","votecast","alias","legacy"} },
878877
{ "budget", "mnfinalbudget", &mnfinalbudget, true, {"command"} },
879-
{ "budget", "checkbudgets", &checkbudgets, true, {} },
878+
{ "budget", "preparebudget", &preparebudget, true, {"name","url","npayments","start","address","monthly_payment"} },
879+
{ "budget", "submitbudget", &submitbudget, true, {"name","url","npayments","start","address","monthly_payment","fee_txid"} },
880880

881881
/* Not shown in help */
882882
{ "hidden", "mnfinalbudgetsuggest", &mnfinalbudgetsuggest, true, {} },

src/rpc/client.cpp

Lines changed: 101 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -28,141 +28,141 @@ class CRPCConvertParam
2828
* @note Parameter indexes start from 0.
2929
*/
3030
static const CRPCConvertParam vRPCConvertParams[] = {
31-
{ "stop", 0, "detach" },
32-
{ "setmocktime", 0, "timestamp" },
33-
{ "getaddednodeinfo", 0, "dummy" },
34-
{ "setgenerate", 0, "generate" },
35-
{ "setgenerate", 1, "genproclimit" },
36-
{ "generate", 0, "nblocks" },
37-
{ "generatetoaddress", 0, "nblocks" },
38-
{ "getnetworkhashps", 0, "nblocks" },
39-
{ "getnetworkhashps", 1, "height" },
31+
{ "addmultisigaddress", 0, "nrequired" },
32+
{ "addmultisigaddress", 1, "keys" },
33+
{ "autocombinerewards", 0, "enable" },
34+
{ "autocombinerewards", 1, "threshold" },
35+
{ "createmultisig", 0, "nrequired" },
36+
{ "createmultisig", 1, "keys" },
37+
{ "createrawtransaction", 0, "transactions" },
38+
{ "createrawtransaction", 1, "outputs" },
39+
{ "createrawtransaction", 2, "locktime" },
4040
{ "delegatestake", 1, "amount" },
4141
{ "delegatestake", 3, "ext_owner" },
4242
{ "delegatestake", 4, "include_delegated" },
4343
{ "delegatestake", 5, "from_shield" },
44-
{ "rawdelegatestake", 1, "amount" },
45-
{ "rawdelegatestake", 3, "ext_owner" },
46-
{ "rawdelegatestake", 4, "include_delegated" },
47-
{ "rawdelegatestake", 5, "from_shield" },
48-
{ "rawdelegatestake", 6, "force" },
49-
{ "sendtoaddress", 1, "amount" },
50-
{ "settxfee", 0, "amount" },
44+
{ "estimatefee", 0, "nblocks" },
45+
{ "estimatesmartfee", 0, "nblocks" },
46+
{ "fundrawtransaction", 1, "options" },
47+
{ "generate", 0, "nblocks" },
48+
{ "generatetoaddress", 0, "nblocks" },
49+
{ "getaddednodeinfo", 0, "dummy" },
50+
{ "getbalance", 0, "minconf" },
51+
{ "getbalance", 1, "include_watchonly" },
52+
{ "getbalance", 2, "include_delegated" },
53+
{ "getbalance", 3, "include_shield" },
54+
{ "getblock", 1, "verbose" },
55+
{ "getblockhash", 0, "height" },
56+
{ "getblockheader", 1, "verbose" },
57+
{ "getblockindexstats", 0, "height" },
58+
{ "getblockindexstats", 1, "range" },
59+
{ "getblocktemplate", 0, "template_request" },
60+
{ "getfeeinfo", 0, "blocks" },
61+
{ "getshieldbalance", 1, "minconf" },
62+
{ "getshieldbalance", 2, "include_watchonly" },
63+
{ "getnetworkhashps", 0, "nblocks" },
64+
{ "getnetworkhashps", 1, "height" },
65+
{ "getrawmempool", 0, "verbose" },
66+
{ "getrawtransaction", 1, "verbose" },
5167
{ "getreceivedbyaddress", 1, "minconf" },
52-
{ "listreceivedbyshieldaddress", 1, "minconf" },
5368
{ "getreceivedbylabel", 1, "minconf" },
69+
{ "getsaplingnotescount", 0, "minconf" },
70+
{ "getsupplyinfo", 0, "force_update" },
71+
{ "gettransaction", 1, "include_watchonly" },
72+
{ "gettxout", 1, "n" },
73+
{ "gettxout", 2, "include_mempool" },
74+
{ "importaddress", 2, "rescan" },
75+
{ "importaddress", 3, "p2sh" },
76+
{ "importmulti", 0, "requests" },
77+
{ "importmulti", 1, "options" },
78+
{ "importprivkey", 2, "rescan" },
79+
{ "importprivkey", 3, "is_staking_address" },
80+
{ "importpubkey", 2, "rescan" },
81+
{ "importsaplingkey", 1, "rescan" },
82+
{ "importsaplingkey", 2, "height" },
83+
{ "importsaplingviewingkey", 1, "rescan" },
84+
{ "importsaplingviewingkey", 2, "height" },
85+
{ "initmasternode", 2, "deterministic" },
86+
{ "keypoolrefill", 0, "newsize" },
5487
{ "listcoldutxos", 0, "not_whitelisted" },
5588
{ "listdelegators", 0, "blacklist" },
56-
{ "getsaplingnotescount", 0, "minconf" },
5789
{ "listreceivedbyaddress", 0, "minconf" },
5890
{ "listreceivedbyaddress", 1, "include_empty" },
5991
{ "listreceivedbyaddress", 2, "include_watchonly" },
6092
{ "listreceivedbylabel", 0, "minconf" },
6193
{ "listreceivedbylabel", 1, "include_empty" },
6294
{ "listreceivedbylabel", 2, "include_watchonly" },
63-
{ "getbalance", 0, "minconf" },
64-
{ "getbalance", 1, "include_watchonly" },
65-
{ "getbalance", 2, "include_delegated" },
66-
{ "getbalance", 3, "include_shield" },
67-
{ "getshieldbalance", 1, "minconf" },
68-
{ "getshieldbalance", 2, "include_watchonly" },
69-
{ "rawshieldsendmany", 1, "amounts" },
70-
{ "rawshieldsendmany", 2, "minconf" },
71-
{ "rawshieldsendmany", 3, "fee" },
72-
{ "shieldsendmany", 1, "amounts" },
73-
{ "shieldsendmany", 2, "minconf" },
74-
{ "shieldsendmany", 3, "fee" },
75-
{ "getblockhash", 0, "height" },
76-
{ "waitforblockheight", 0, "height" },
77-
{ "waitforblockheight", 1, "timeout" },
78-
{ "waitforblock", 1, "timeout" },
79-
{ "waitfornewblock", 0, "timeout" },
95+
{ "listreceivedbyshieldaddress", 1, "minconf" },
96+
{ "listshieldunspent", 0, "minconf" },
97+
{ "listshieldunspent", 1, "maxconf" },
98+
{ "listshieldunspent", 2, "include_watchonly" },
99+
{ "listshieldunspent", 3, "addresses" },
100+
{ "listsinceblock", 1, "target_confirmations" },
101+
{ "listsinceblock", 2, "include_watchonly" },
80102
{ "listtransactions", 1, "count" },
81103
{ "listtransactions", 2, "from" },
82104
{ "listtransactions", 3, "include_watchonly" },
83105
{ "listtransactions", 4, "include_delegated" },
84106
{ "listtransactions", 5, "include_cold" },
85-
{ "walletpassphrase", 1, "timeout" },
86-
{ "walletpassphrase", 2, "staking_only" },
87-
{ "getblocktemplate", 0, "template_request" },
88-
{ "listsinceblock", 1, "target_confirmations" },
89-
{ "listsinceblock", 2, "include_watchonly" },
90-
{ "sendmany", 1, "amounts" },
91-
{ "sendmany", 2, "minconf" },
92-
{ "addmultisigaddress", 0, "nrequired" },
93-
{ "addmultisigaddress", 1, "keys" },
94-
{ "createmultisig", 0, "nrequired" },
95-
{ "createmultisig", 1, "keys" },
96107
{ "listunspent", 0, "minconf" },
97108
{ "listunspent", 1, "maxconf" },
98109
{ "listunspent", 2, "addresses" },
99110
{ "listunspent", 3, "watchonly_config" },
100111
{ "listunspent", 4, "query_options" },
101-
{ "listshieldunspent", 0, "minconf" },
102-
{ "listshieldunspent", 1, "maxconf" },
103-
{ "listshieldunspent", 2, "include_watchonly" },
104-
{ "listshieldunspent", 3, "addresses" },
105-
{ "logging", 0, "include" },
106-
{ "logging", 1, "exclude" },
107-
{ "getblock", 1, "verbose" },
108-
{ "getblockheader", 1, "verbose" },
109-
{ "gettransaction", 1, "include_watchonly" },
110-
{ "getrawtransaction", 1, "verbose" },
111-
{ "createrawtransaction", 0, "transactions" },
112-
{ "createrawtransaction", 1, "outputs" },
113-
{ "createrawtransaction", 2, "locktime" },
114-
{ "fundrawtransaction", 1, "options" },
115-
{ "signrawtransaction", 1, "prevtxs" },
116-
{ "signrawtransaction", 2, "privkeys" },
117-
{ "sendrawtransaction", 1, "allowhighfees" },
118-
{ "sethdseed", 0, "newkeypool" },
119-
{ "gettxout", 1, "n" },
120-
{ "gettxout", 2, "include_mempool" },
121112
{ "lockunspent", 0, "unlock" },
122113
{ "lockunspent", 1, "transactions" },
123-
{ "importprivkey", 2, "rescan" },
124-
{ "importprivkey", 3, "is_staking_address" },
125-
{ "importaddress", 2, "rescan" },
126-
{ "importaddress", 3, "p2sh" },
127-
{ "importpubkey", 2, "rescan" },
128-
{ "importmulti", 0, "requests" },
129-
{ "importmulti", 1, "options" },
130-
{ "importsaplingkey", 1, "rescan" },
131-
{ "importsaplingkey", 2, "height" },
132-
{ "importsaplingviewingkey", 1, "rescan" },
133-
{ "importsaplingviewingkey", 2, "height" },
134-
{ "initmasternode", 2, "deterministic" },
135-
{ "verifychain", 0, "nblocks" },
136-
{ "keypoolrefill", 0, "newsize" },
137-
{ "getrawmempool", 0, "verbose" },
138-
{ "estimatefee", 0, "nblocks" },
139-
{ "estimatesmartfee", 0, "nblocks" },
114+
{ "logging", 0, "include" },
115+
{ "logging", 1, "exclude" },
116+
{ "mnbudgetvote", 4, "legacy" },
117+
{ "mnbudgetrawvote", 1, "collat_vout" },
118+
{ "mnbudgetrawvote", 4, "time" },
119+
{ "preparebudget", 2, "npayments" },
120+
{ "preparebudget", 3, "start" },
121+
{ "preparebudget", 5, "montly_payment" },
140122
{ "prioritisetransaction", 1, "priority_delta" },
141123
{ "prioritisetransaction", 2, "fee_delta" },
124+
{ "rawdelegatestake", 1, "amount" },
125+
{ "rawdelegatestake", 3, "ext_owner" },
126+
{ "rawdelegatestake", 4, "include_delegated" },
127+
{ "rawdelegatestake", 5, "from_shield" },
128+
{ "rawdelegatestake", 6, "force" },
129+
{ "rawshieldsendmany", 1, "amounts" },
130+
{ "rawshieldsendmany", 2, "minconf" },
131+
{ "rawshieldsendmany", 3, "fee" },
132+
{ "rescanblockchain", 0, "start_height"},
133+
{ "rescanblockchain", 1, "stop_height"},
134+
{ "sendmany", 1, "amounts" },
135+
{ "sendmany", 2, "minconf" },
136+
{ "sendrawtransaction", 1, "allowhighfees" },
137+
{ "sendtoaddress", 1, "amount" },
138+
{ "setautocombinethreshold", 0, "enable" },
139+
{ "setautocombinethreshold", 1, "threshold" },
142140
{ "setban", 2, "bantime" },
143141
{ "setban", 3, "absolute" },
142+
{ "setgenerate", 0, "generate" },
143+
{ "setgenerate", 1, "genproclimit" },
144+
{ "sethdseed", 0, "newkeypool" },
145+
{ "setmocktime", 0, "timestamp" },
146+
{ "setstakesplitthreshold", 0, "value" },
147+
{ "settxfee", 0, "amount" },
148+
{ "shieldsendmany", 1, "amounts" },
149+
{ "shieldsendmany", 2, "minconf" },
150+
{ "shieldsendmany", 3, "fee" },
151+
{ "signrawtransaction", 1, "prevtxs" },
152+
{ "signrawtransaction", 2, "privkeys" },
144153
{ "spork", 1, "value" },
145-
{ "preparebudget", 2, "npayments" },
146-
{ "preparebudget", 3, "start" },
147-
{ "preparebudget", 5, "montly_payment" },
154+
{ "startmasternode", 3, "lockwallet" },
155+
{ "stop", 0, "detach" },
148156
{ "submitbudget", 2, "npayments" },
149157
{ "submitbudget", 3, "start" },
150158
{ "submitbudget", 5, "montly_payment" },
151-
{ "startmasternode", 3, "lockwallet" },
152-
{ "mnbudgetvote", 4, "legacy" },
153-
{ "mnbudgetrawvote", 1, "collat_vout" },
154-
{ "mnbudgetrawvote", 4, "time" },
155-
{ "setstakesplitthreshold", 0, "value" },
156-
{ "autocombinerewards", 0, "enable" },
157-
{ "autocombinerewards", 1, "threshold" },
158-
{ "setautocombinethreshold", 0, "enable" },
159-
{ "setautocombinethreshold", 1, "threshold" },
160-
{ "getblockindexstats", 0, "height" },
161-
{ "getblockindexstats", 1, "range" },
162-
{ "getfeeinfo", 0, "blocks" },
163-
{ "getsupplyinfo", 0, "force_update" },
164-
{ "rescanblockchain", 0, "start_height"},
165-
{ "rescanblockchain", 1, "stop_height"},
159+
{ "verifychain", 0, "nblocks" },
160+
{ "waitforblock", 1, "timeout" },
161+
{ "waitforblockheight", 0, "height" },
162+
{ "waitforblockheight", 1, "timeout" },
163+
{ "waitfornewblock", 0, "timeout" },
164+
{ "walletpassphrase", 1, "timeout" },
165+
{ "walletpassphrase", 2, "staking_only" },
166166
// Echo with conversion (For testing only)
167167
{ "echojson", 0, "arg0" },
168168
{ "echojson", 1, "arg1" },

src/rpc/masternode.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,20 +1093,20 @@ UniValue relaymasternodebroadcast(const JSONRPCRequest& request)
10931093
static const CRPCCommand commands[] =
10941094
{ // category name actor (function) okSafe argNames
10951095
// --------------------- --------------------------- -------------------------- ------ --------
1096-
{ "masternode", "listmasternodes", &listmasternodes, true, {"filter"} },
1097-
{ "masternode", "getmasternodecount", &getmasternodecount, true, {} },
1098-
{ "masternode", "masternodecurrent", &masternodecurrent, true, {} },
1099-
{ "masternode", "startmasternode", &startmasternode, true, {"set","lockwallet","alias","reload_conf"} },
1096+
{ "masternode", "createmasternodebroadcast", &createmasternodebroadcast, true, {"command","alias"} },
11001097
{ "masternode", "createmasternodekey", &createmasternodekey, true, {} },
1098+
{ "masternode", "decodemasternodebroadcast", &decodemasternodebroadcast, true, {"hexstring"} },
1099+
{ "masternode", "getmasternodecount", &getmasternodecount, true, {} },
11011100
{ "masternode", "getmasternodeoutputs", &getmasternodeoutputs, true, {} },
1102-
{ "masternode", "listmasternodeconf", &listmasternodeconf, true, {"filter"} },
1101+
{ "masternode", "getmasternodescores", &getmasternodescores, true, {"blocks"} },
11031102
{ "masternode", "getmasternodestatus", &getmasternodestatus, true, {} },
11041103
{ "masternode", "getmasternodewinners", &getmasternodewinners, true, {"blocks","filter"} },
1105-
{ "masternode", "getmasternodescores", &getmasternodescores, true, {"blocks"} },
1106-
{ "masternode", "createmasternodebroadcast", &createmasternodebroadcast, true, {"command","alias"} },
1107-
{ "masternode", "decodemasternodebroadcast", &decodemasternodebroadcast, true, {"hexstring"} },
1108-
{ "masternode", "relaymasternodebroadcast", &relaymasternodebroadcast, true, {"hexstring"} },
11091104
{ "masternode", "initmasternode", &initmasternode, true, {"privkey","address","deterministic"} },
1105+
{ "masternode", "listmasternodeconf", &listmasternodeconf, true, {"filter"} },
1106+
{ "masternode", "listmasternodes", &listmasternodes, true, {"filter"} },
1107+
{ "masternode", "masternodecurrent", &masternodecurrent, true, {} },
1108+
{ "masternode", "relaymasternodebroadcast", &relaymasternodebroadcast, true, {"hexstring"} },
1109+
{ "masternode", "startmasternode", &startmasternode, true, {"set","lockwallet","alias","reload_conf"} },
11101110

11111111
/* Not shown in help */
11121112
{ "hidden", "getcachedblockhashes", &getcachedblockhashes, true, {} },

src/rpc/mining.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,9 +879,9 @@ UniValue estimatesmartfee(const JSONRPCRequest& request)
879879
static const CRPCCommand commands[] =
880880
{ // category name actor (function) okSafe argNames
881881
// --------------------- ------------------------ ----------------------- ------ --------
882-
{ "mining", "prioritisetransaction", &prioritisetransaction, true, {"txid","priority_delta","fee_delta"} },
883882
{ "util", "estimatefee", &estimatefee, true, {"nblocks"} },
884883
{ "util", "estimatesmartfee", &estimatesmartfee, true, {"nblocks"} },
884+
{ "mining", "prioritisetransaction", &prioritisetransaction, true, {"txid","priority_delta","fee_delta"} },
885885

886886
/* Not shown in help */
887887
#ifdef ENABLE_WALLET

0 commit comments

Comments
 (0)