Browse Source

Merge pull request #3964

ab88ed9 Organize RPCCommands table (Wladimir J. van der Laan)
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
e18bc583d4
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 4
      src/rpcnet.cpp
  2. 103
      src/rpcserver.cpp

4
src/rpcnet.cpp

@ -10,10 +10,6 @@ @@ -10,10 +10,6 @@
#include "protocol.h"
#include "sync.h"
#include "util.h"
#ifdef ENABLE_WALLET
#include "init.h" // for getinfo
#include "wallet.h" // for getinfo
#endif
#include <boost/foreach.hpp>
#include "json/json_spirit_value.h"

103
src/rpcserver.cpp

@ -222,86 +222,95 @@ Value stop(const Array& params, bool fHelp) @@ -222,86 +222,95 @@ Value stop(const Array& params, bool fHelp)
static const CRPCCommand vRPCCommands[] =
{ // name actor (function) okSafeMode threadSafe reqWallet
// ------------------------ ----------------------- ---------- ---------- ---------
/* Overall control/query calls */
{ "getinfo", &getinfo, true, false, false }, /* uses wallet if enabled */
{ "help", &help, true, true, false },
{ "stop", &stop, true, true, false },
{ "getblockcount", &getblockcount, true, false, false },
{ "getbestblockhash", &getbestblockhash, true, false, false },
{ "getconnectioncount", &getconnectioncount, true, false, false },
{ "getpeerinfo", &getpeerinfo, true, false, false },
{ "ping", &ping, true, false, false },
/* P2P networking */
{ "addnode", &addnode, true, true, false },
{ "getaddednodeinfo", &getaddednodeinfo, true, true, false },
{ "getconnectioncount", &getconnectioncount, true, false, false },
{ "getnettotals", &getnettotals, true, true, false },
{ "getdifficulty", &getdifficulty, true, false, false },
{ "getinfo", &getinfo, true, false, false },
{ "getrawmempool", &getrawmempool, true, false, false },
{ "getpeerinfo", &getpeerinfo, true, false, false },
{ "ping", &ping, true, false, false },
/* Block chain and UTXO */
{ "getbestblockhash", &getbestblockhash, true, false, false },
{ "getblockcount", &getblockcount, true, false, false },
{ "getblock", &getblock, false, false, false },
{ "getblockhash", &getblockhash, false, false, false },
{ "getrawtransaction", &getrawtransaction, false, false, false },
{ "createrawtransaction", &createrawtransaction, false, false, false },
{ "decoderawtransaction", &decoderawtransaction, false, false, false },
{ "decodescript", &decodescript, false, false, false },
{ "signrawtransaction", &signrawtransaction, false, false, false },
{ "sendrawtransaction", &sendrawtransaction, false, false, false },
{ "gettxoutsetinfo", &gettxoutsetinfo, true, false, false },
{ "getdifficulty", &getdifficulty, true, false, false },
{ "getrawmempool", &getrawmempool, true, false, false },
{ "gettxout", &gettxout, true, false, false },
{ "gettxoutsetinfo", &gettxoutsetinfo, true, false, false },
{ "verifychain", &verifychain, true, false, false },
/* Mining */
{ "getnetworkhashps", &getnetworkhashps, true, false, false },
{ "getmininginfo", &getmininginfo, true, false, false },
{ "getblocktemplate", &getblocktemplate, true, false, false },
{ "getmininginfo", &getmininginfo, true, false, false },
{ "getnetworkhashps", &getnetworkhashps, true, false, false },
{ "submitblock", &submitblock, false, false, false },
{ "validateaddress", &validateaddress, true, false, false },
/* Raw transactions */
{ "createrawtransaction", &createrawtransaction, false, false, false },
{ "decoderawtransaction", &decoderawtransaction, false, false, false },
{ "decodescript", &decodescript, false, false, false },
{ "getrawtransaction", &getrawtransaction, false, false, false },
{ "sendrawtransaction", &sendrawtransaction, false, false, false },
{ "signrawtransaction", &signrawtransaction, false, false, false }, /* uses wallet if enabled */
/* Utility functions */
{ "createmultisig", &createmultisig, true, true , false },
{ "validateaddress", &validateaddress, true, false, false }, /* uses wallet if enabled */
{ "verifymessage", &verifymessage, false, false, false },
#ifdef ENABLE_WALLET
/* Wallet */
{ "getnewaddress", &getnewaddress, true, false, true },
{ "addmultisigaddress", &addmultisigaddress, false, false, true },
{ "backupwallet", &backupwallet, true, false, true },
{ "dumpprivkey", &dumpprivkey, true, false, true },
{ "dumpwallet", &dumpwallet, true, false, true },
{ "encryptwallet", &encryptwallet, false, false, true },
{ "getaccountaddress", &getaccountaddress, true, false, true },
{ "getrawchangeaddress", &getrawchangeaddress, true, false, true },
{ "setaccount", &setaccount, true, false, true },
{ "getaccount", &getaccount, false, false, true },
{ "getaddressesbyaccount", &getaddressesbyaccount, true, false, true },
{ "sendtoaddress", &sendtoaddress, false, false, true },
{ "getreceivedbyaddress", &getreceivedbyaddress, false, false, true },
{ "getreceivedbyaccount", &getreceivedbyaccount, false, false, true },
{ "listreceivedbyaddress", &listreceivedbyaddress, false, false, true },
{ "listreceivedbyaccount", &listreceivedbyaccount, false, false, true },
{ "backupwallet", &backupwallet, true, false, true },
{ "keypoolrefill", &keypoolrefill, true, false, true },
{ "walletpassphrase", &walletpassphrase, true, false, true },
{ "walletpassphrasechange", &walletpassphrasechange, false, false, true },
{ "walletlock", &walletlock, true, false, true },
{ "encryptwallet", &encryptwallet, false, false, true },
{ "getbalance", &getbalance, false, false, true },
{ "getunconfirmedbalance", &getunconfirmedbalance, false, false, true },
{ "move", &movecmd, false, false, true },
{ "sendfrom", &sendfrom, false, false, true },
{ "sendmany", &sendmany, false, false, true },
{ "addmultisigaddress", &addmultisigaddress, false, false, true },
{ "getnewaddress", &getnewaddress, true, false, true },
{ "getrawchangeaddress", &getrawchangeaddress, true, false, true },
{ "getreceivedbyaccount", &getreceivedbyaccount, false, false, true },
{ "getreceivedbyaddress", &getreceivedbyaddress, false, false, true },
{ "gettransaction", &gettransaction, false, false, true },
{ "listtransactions", &listtransactions, false, false, true },
{ "listaddressgroupings", &listaddressgroupings, false, false, true },
{ "signmessage", &signmessage, false, false, true },
{ "listaccounts", &listaccounts, false, false, true },
{ "listsinceblock", &listsinceblock, false, false, true },
{ "dumpprivkey", &dumpprivkey, true, false, true },
{ "dumpwallet", &dumpwallet, true, false, true },
{ "getunconfirmedbalance", &getunconfirmedbalance, false, false, true },
{ "getwalletinfo", &getwalletinfo, true, false, true },
{ "importprivkey", &importprivkey, false, false, true },
{ "importwallet", &importwallet, false, false, true },
{ "keypoolrefill", &keypoolrefill, true, false, true },
{ "listaccounts", &listaccounts, false, false, true },
{ "listaddressgroupings", &listaddressgroupings, false, false, true },
{ "listlockunspent", &listlockunspent, false, false, true },
{ "listreceivedbyaccount", &listreceivedbyaccount, false, false, true },
{ "listreceivedbyaddress", &listreceivedbyaddress, false, false, true },
{ "listsinceblock", &listsinceblock, false, false, true },
{ "listtransactions", &listtransactions, false, false, true },
{ "listunspent", &listunspent, false, false, true },
{ "lockunspent", &lockunspent, false, false, true },
{ "listlockunspent", &listlockunspent, false, false, true },
{ "move", &movecmd, false, false, true },
{ "sendfrom", &sendfrom, false, false, true },
{ "sendmany", &sendmany, false, false, true },
{ "sendtoaddress", &sendtoaddress, false, false, true },
{ "setaccount", &setaccount, true, false, true },
{ "settxfee", &settxfee, false, false, true },
{ "getwalletinfo", &getwalletinfo, true, false, true },
{ "signmessage", &signmessage, false, false, true },
{ "walletlock", &walletlock, true, false, true },
{ "walletpassphrasechange", &walletpassphrasechange, false, false, true },
{ "walletpassphrase", &walletpassphrase, true, false, true },
/* Wallet-enabled mining */
{ "getgenerate", &getgenerate, true, false, false },
{ "setgenerate", &setgenerate, true, true, false },
{ "gethashespersec", &gethashespersec, true, false, false },
{ "getwork", &getwork, true, false, true },
{ "setgenerate", &setgenerate, true, true, false },
#endif // ENABLE_WALLET
};

Loading…
Cancel
Save