Push down RPC reqWallet flag
This commit is contained in:
@@ -193,11 +193,6 @@ string CRPCTable::help(string strCommand) const
|
||||
continue;
|
||||
if ((strCommand != "" || pcmd->category == "hidden") && strMethod != strCommand)
|
||||
continue;
|
||||
#ifdef ENABLE_WALLET
|
||||
if (pcmd->reqWallet && !pwalletMain)
|
||||
continue;
|
||||
#endif
|
||||
|
||||
try
|
||||
{
|
||||
Array params;
|
||||
@@ -271,114 +266,114 @@ Value stop(const Array& params, bool fHelp)
|
||||
* Call Table
|
||||
*/
|
||||
static const CRPCCommand vRPCCommands[] =
|
||||
{ // category name actor (function) okSafeMode reqWallet
|
||||
// --------------------- ------------------------ ----------------------- ---------- ---------
|
||||
{ // category name actor (function) okSafeMode
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
/* Overall control/query calls */
|
||||
{ "control", "getinfo", &getinfo, true, false }, /* uses wallet if enabled */
|
||||
{ "control", "help", &help, true, false },
|
||||
{ "control", "stop", &stop, true, false },
|
||||
{ "control", "getinfo", &getinfo, true }, /* uses wallet if enabled */
|
||||
{ "control", "help", &help, true },
|
||||
{ "control", "stop", &stop, true },
|
||||
|
||||
/* P2P networking */
|
||||
{ "network", "getnetworkinfo", &getnetworkinfo, true, false },
|
||||
{ "network", "addnode", &addnode, true, false },
|
||||
{ "network", "getaddednodeinfo", &getaddednodeinfo, true, false },
|
||||
{ "network", "getconnectioncount", &getconnectioncount, true, false },
|
||||
{ "network", "getnettotals", &getnettotals, true, false },
|
||||
{ "network", "getpeerinfo", &getpeerinfo, true, false },
|
||||
{ "network", "ping", &ping, true, false },
|
||||
{ "network", "getnetworkinfo", &getnetworkinfo, true },
|
||||
{ "network", "addnode", &addnode, true },
|
||||
{ "network", "getaddednodeinfo", &getaddednodeinfo, true },
|
||||
{ "network", "getconnectioncount", &getconnectioncount, true },
|
||||
{ "network", "getnettotals", &getnettotals, true },
|
||||
{ "network", "getpeerinfo", &getpeerinfo, true },
|
||||
{ "network", "ping", &ping, true },
|
||||
|
||||
/* Block chain and UTXO */
|
||||
{ "blockchain", "getblockchaininfo", &getblockchaininfo, true, false },
|
||||
{ "blockchain", "getbestblockhash", &getbestblockhash, true, false },
|
||||
{ "blockchain", "getblockcount", &getblockcount, true, false },
|
||||
{ "blockchain", "getblock", &getblock, true, false },
|
||||
{ "blockchain", "getblockhash", &getblockhash, true, false },
|
||||
{ "blockchain", "getchaintips", &getchaintips, true, false },
|
||||
{ "blockchain", "getdifficulty", &getdifficulty, true, false },
|
||||
{ "blockchain", "getmempoolinfo", &getmempoolinfo, true, false },
|
||||
{ "blockchain", "getrawmempool", &getrawmempool, true, false },
|
||||
{ "blockchain", "gettxout", &gettxout, true, false },
|
||||
{ "blockchain", "gettxoutsetinfo", &gettxoutsetinfo, true, false },
|
||||
{ "blockchain", "verifychain", &verifychain, true, false },
|
||||
{ "blockchain", "getblockchaininfo", &getblockchaininfo, true },
|
||||
{ "blockchain", "getbestblockhash", &getbestblockhash, true },
|
||||
{ "blockchain", "getblockcount", &getblockcount, true },
|
||||
{ "blockchain", "getblock", &getblock, true },
|
||||
{ "blockchain", "getblockhash", &getblockhash, true },
|
||||
{ "blockchain", "getchaintips", &getchaintips, true },
|
||||
{ "blockchain", "getdifficulty", &getdifficulty, true },
|
||||
{ "blockchain", "getmempoolinfo", &getmempoolinfo, true },
|
||||
{ "blockchain", "getrawmempool", &getrawmempool, true },
|
||||
{ "blockchain", "gettxout", &gettxout, true },
|
||||
{ "blockchain", "gettxoutsetinfo", &gettxoutsetinfo, true },
|
||||
{ "blockchain", "verifychain", &verifychain, true },
|
||||
|
||||
/* Mining */
|
||||
{ "mining", "getblocktemplate", &getblocktemplate, true, false },
|
||||
{ "mining", "getmininginfo", &getmininginfo, true, false },
|
||||
{ "mining", "getnetworkhashps", &getnetworkhashps, true, false },
|
||||
{ "mining", "prioritisetransaction", &prioritisetransaction, true, false },
|
||||
{ "mining", "submitblock", &submitblock, true, false },
|
||||
{ "mining", "getblocktemplate", &getblocktemplate, true },
|
||||
{ "mining", "getmininginfo", &getmininginfo, true },
|
||||
{ "mining", "getnetworkhashps", &getnetworkhashps, true },
|
||||
{ "mining", "prioritisetransaction", &prioritisetransaction, true },
|
||||
{ "mining", "submitblock", &submitblock, true },
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
/* Coin generation */
|
||||
{ "generating", "getgenerate", &getgenerate, true, false },
|
||||
{ "generating", "setgenerate", &setgenerate, true, false },
|
||||
{ "generating", "generate", &generate, true, false },
|
||||
{ "generating", "getgenerate", &getgenerate, true },
|
||||
{ "generating", "setgenerate", &setgenerate, true },
|
||||
{ "generating", "generate", &generate, true },
|
||||
#endif
|
||||
|
||||
/* Raw transactions */
|
||||
{ "rawtransactions", "createrawtransaction", &createrawtransaction, true, false },
|
||||
{ "rawtransactions", "decoderawtransaction", &decoderawtransaction, true, false },
|
||||
{ "rawtransactions", "decodescript", &decodescript, true, false },
|
||||
{ "rawtransactions", "getrawtransaction", &getrawtransaction, true, false },
|
||||
{ "rawtransactions", "sendrawtransaction", &sendrawtransaction, false, false },
|
||||
{ "rawtransactions", "signrawtransaction", &signrawtransaction, false, false }, /* uses wallet if enabled */
|
||||
{ "rawtransactions", "createrawtransaction", &createrawtransaction, true },
|
||||
{ "rawtransactions", "decoderawtransaction", &decoderawtransaction, true },
|
||||
{ "rawtransactions", "decodescript", &decodescript, true },
|
||||
{ "rawtransactions", "getrawtransaction", &getrawtransaction, true },
|
||||
{ "rawtransactions", "sendrawtransaction", &sendrawtransaction, false },
|
||||
{ "rawtransactions", "signrawtransaction", &signrawtransaction, false }, /* uses wallet if enabled */
|
||||
|
||||
/* Utility functions */
|
||||
{ "util", "createmultisig", &createmultisig, true, false },
|
||||
{ "util", "validateaddress", &validateaddress, true, false }, /* uses wallet if enabled */
|
||||
{ "util", "verifymessage", &verifymessage, true, false },
|
||||
{ "util", "estimatefee", &estimatefee, true, false },
|
||||
{ "util", "estimatepriority", &estimatepriority, true, false },
|
||||
{ "util", "createmultisig", &createmultisig, true },
|
||||
{ "util", "validateaddress", &validateaddress, true }, /* uses wallet if enabled */
|
||||
{ "util", "verifymessage", &verifymessage, true },
|
||||
{ "util", "estimatefee", &estimatefee, true },
|
||||
{ "util", "estimatepriority", &estimatepriority, true },
|
||||
|
||||
/* Not shown in help */
|
||||
{ "hidden", "invalidateblock", &invalidateblock, true, false },
|
||||
{ "hidden", "reconsiderblock", &reconsiderblock, true, false },
|
||||
{ "hidden", "setmocktime", &setmocktime, true, false },
|
||||
{ "hidden", "invalidateblock", &invalidateblock, true },
|
||||
{ "hidden", "reconsiderblock", &reconsiderblock, true },
|
||||
{ "hidden", "setmocktime", &setmocktime, true },
|
||||
#ifdef ENABLE_WALLET
|
||||
{ "hidden", "resendwallettransactions", &resendwallettransactions, true, true },
|
||||
{ "hidden", "resendwallettransactions", &resendwallettransactions, true},
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
/* Wallet */
|
||||
{ "wallet", "addmultisigaddress", &addmultisigaddress, true, true },
|
||||
{ "wallet", "backupwallet", &backupwallet, true, true },
|
||||
{ "wallet", "dumpprivkey", &dumpprivkey, true, true },
|
||||
{ "wallet", "dumpwallet", &dumpwallet, true, true },
|
||||
{ "wallet", "encryptwallet", &encryptwallet, true, true },
|
||||
{ "wallet", "getaccountaddress", &getaccountaddress, true, true },
|
||||
{ "wallet", "getaccount", &getaccount, true, true },
|
||||
{ "wallet", "getaddressesbyaccount", &getaddressesbyaccount, true, true },
|
||||
{ "wallet", "getbalance", &getbalance, false, true },
|
||||
{ "wallet", "getnewaddress", &getnewaddress, true, true },
|
||||
{ "wallet", "getrawchangeaddress", &getrawchangeaddress, true, true },
|
||||
{ "wallet", "getreceivedbyaccount", &getreceivedbyaccount, false, true },
|
||||
{ "wallet", "getreceivedbyaddress", &getreceivedbyaddress, false, true },
|
||||
{ "wallet", "gettransaction", &gettransaction, false, true },
|
||||
{ "wallet", "getunconfirmedbalance", &getunconfirmedbalance, false, true },
|
||||
{ "wallet", "getwalletinfo", &getwalletinfo, false, true },
|
||||
{ "wallet", "importprivkey", &importprivkey, true, true },
|
||||
{ "wallet", "importwallet", &importwallet, true, true },
|
||||
{ "wallet", "importaddress", &importaddress, true, true },
|
||||
{ "wallet", "keypoolrefill", &keypoolrefill, true, true },
|
||||
{ "wallet", "listaccounts", &listaccounts, false, true },
|
||||
{ "wallet", "listaddressgroupings", &listaddressgroupings, false, true },
|
||||
{ "wallet", "listlockunspent", &listlockunspent, false, true },
|
||||
{ "wallet", "listreceivedbyaccount", &listreceivedbyaccount, false, true },
|
||||
{ "wallet", "listreceivedbyaddress", &listreceivedbyaddress, false, true },
|
||||
{ "wallet", "listsinceblock", &listsinceblock, false, true },
|
||||
{ "wallet", "listtransactions", &listtransactions, false, true },
|
||||
{ "wallet", "listunspent", &listunspent, false, true },
|
||||
{ "wallet", "lockunspent", &lockunspent, true, true },
|
||||
{ "wallet", "move", &movecmd, false, true },
|
||||
{ "wallet", "sendfrom", &sendfrom, false, true },
|
||||
{ "wallet", "sendmany", &sendmany, false, true },
|
||||
{ "wallet", "sendtoaddress", &sendtoaddress, false, true },
|
||||
{ "wallet", "setaccount", &setaccount, true, true },
|
||||
{ "wallet", "settxfee", &settxfee, true, true },
|
||||
{ "wallet", "signmessage", &signmessage, true, true },
|
||||
{ "wallet", "walletlock", &walletlock, true, true },
|
||||
{ "wallet", "walletpassphrasechange", &walletpassphrasechange, true, true },
|
||||
{ "wallet", "walletpassphrase", &walletpassphrase, true, true },
|
||||
{ "wallet", "addmultisigaddress", &addmultisigaddress, true },
|
||||
{ "wallet", "backupwallet", &backupwallet, true },
|
||||
{ "wallet", "dumpprivkey", &dumpprivkey, true },
|
||||
{ "wallet", "dumpwallet", &dumpwallet, true },
|
||||
{ "wallet", "encryptwallet", &encryptwallet, true },
|
||||
{ "wallet", "getaccountaddress", &getaccountaddress, true },
|
||||
{ "wallet", "getaccount", &getaccount, true },
|
||||
{ "wallet", "getaddressesbyaccount", &getaddressesbyaccount, true },
|
||||
{ "wallet", "getbalance", &getbalance, false },
|
||||
{ "wallet", "getnewaddress", &getnewaddress, true },
|
||||
{ "wallet", "getrawchangeaddress", &getrawchangeaddress, true },
|
||||
{ "wallet", "getreceivedbyaccount", &getreceivedbyaccount, false },
|
||||
{ "wallet", "getreceivedbyaddress", &getreceivedbyaddress, false },
|
||||
{ "wallet", "gettransaction", &gettransaction, false },
|
||||
{ "wallet", "getunconfirmedbalance", &getunconfirmedbalance, false },
|
||||
{ "wallet", "getwalletinfo", &getwalletinfo, false },
|
||||
{ "wallet", "importprivkey", &importprivkey, true },
|
||||
{ "wallet", "importwallet", &importwallet, true },
|
||||
{ "wallet", "importaddress", &importaddress, true },
|
||||
{ "wallet", "keypoolrefill", &keypoolrefill, true },
|
||||
{ "wallet", "listaccounts", &listaccounts, false },
|
||||
{ "wallet", "listaddressgroupings", &listaddressgroupings, false },
|
||||
{ "wallet", "listlockunspent", &listlockunspent, false },
|
||||
{ "wallet", "listreceivedbyaccount", &listreceivedbyaccount, false },
|
||||
{ "wallet", "listreceivedbyaddress", &listreceivedbyaddress, false },
|
||||
{ "wallet", "listsinceblock", &listsinceblock, false },
|
||||
{ "wallet", "listtransactions", &listtransactions, false },
|
||||
{ "wallet", "listunspent", &listunspent, false },
|
||||
{ "wallet", "lockunspent", &lockunspent, true },
|
||||
{ "wallet", "move", &movecmd, false },
|
||||
{ "wallet", "sendfrom", &sendfrom, false },
|
||||
{ "wallet", "sendmany", &sendmany, false },
|
||||
{ "wallet", "sendtoaddress", &sendtoaddress, false },
|
||||
{ "wallet", "setaccount", &setaccount, true },
|
||||
{ "wallet", "settxfee", &settxfee, true },
|
||||
{ "wallet", "signmessage", &signmessage, true },
|
||||
{ "wallet", "walletlock", &walletlock, true },
|
||||
{ "wallet", "walletpassphrasechange", &walletpassphrasechange, true },
|
||||
{ "wallet", "walletpassphrase", &walletpassphrase, true },
|
||||
#endif // ENABLE_WALLET
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user