Trim RPC command table

- invalidateblock and reconsiderblock were defined doubly
- remove no-longer-used threadSafe, as locks have been pushed down
This commit is contained in:
Wladimir J. van der Laan 2015-01-26 13:52:12 +01:00
parent 4401b2d7c5
commit 5ebe0956b3
2 changed files with 84 additions and 87 deletions

View File

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

View File

@ -98,7 +98,6 @@ public:
std::string name; std::string name;
rpcfn_type actor; rpcfn_type actor;
bool okSafeMode; bool okSafeMode;
bool threadSafe;
bool reqWallet; bool reqWallet;
}; };