Browse Source

Merge pull request #2348 from freewil/crpccommand-table

make vRPCCommands comment match property names
miguelfreitas
Gavin Andresen 12 years ago
parent
commit
bd80c66ac0
  1. 130
      src/bitcoinrpc.cpp
  2. 2
      src/bitcoinrpc.h

130
src/bitcoinrpc.cpp

@ -194,70 +194,70 @@ Value stop(const Array& params, bool fHelp)
static const CRPCCommand vRPCCommands[] = static const CRPCCommand vRPCCommands[] =
{ // name function safemd unlocked { // name actor (function) okSafeMode threadSafe
// ------------------------ ----------------------- ------ -------- // ------------------------ ----------------------- ---------- ----------
{ "help", &help, true, true }, { "help", &help, true, true },
{ "stop", &stop, true, true }, { "stop", &stop, true, true },
{ "getblockcount", &getblockcount, true, false }, { "getblockcount", &getblockcount, true, false },
{ "getconnectioncount", &getconnectioncount, true, false }, { "getconnectioncount", &getconnectioncount, true, false },
{ "getpeerinfo", &getpeerinfo, true, false }, { "getpeerinfo", &getpeerinfo, true, false },
{ "addnode", &addnode, true, true }, { "addnode", &addnode, true, true },
{ "getaddednodeinfo", &getaddednodeinfo, true, true }, { "getaddednodeinfo", &getaddednodeinfo, true, true },
{ "getdifficulty", &getdifficulty, true, false }, { "getdifficulty", &getdifficulty, true, false },
{ "getgenerate", &getgenerate, true, false }, { "getgenerate", &getgenerate, true, false },
{ "setgenerate", &setgenerate, true, false }, { "setgenerate", &setgenerate, true, false },
{ "gethashespersec", &gethashespersec, true, false }, { "gethashespersec", &gethashespersec, true, false },
{ "getinfo", &getinfo, true, false }, { "getinfo", &getinfo, true, false },
{ "getmininginfo", &getmininginfo, true, false }, { "getmininginfo", &getmininginfo, true, false },
{ "getnewaddress", &getnewaddress, true, false }, { "getnewaddress", &getnewaddress, true, false },
{ "getaccountaddress", &getaccountaddress, true, false }, { "getaccountaddress", &getaccountaddress, true, false },
{ "setaccount", &setaccount, true, false }, { "setaccount", &setaccount, true, false },
{ "getaccount", &getaccount, false, false }, { "getaccount", &getaccount, false, false },
{ "getaddressesbyaccount", &getaddressesbyaccount, true, false }, { "getaddressesbyaccount", &getaddressesbyaccount, true, false },
{ "sendtoaddress", &sendtoaddress, false, false }, { "sendtoaddress", &sendtoaddress, false, false },
{ "getreceivedbyaddress", &getreceivedbyaddress, false, false }, { "getreceivedbyaddress", &getreceivedbyaddress, false, false },
{ "getreceivedbyaccount", &getreceivedbyaccount, false, false }, { "getreceivedbyaccount", &getreceivedbyaccount, false, false },
{ "listreceivedbyaddress", &listreceivedbyaddress, false, false }, { "listreceivedbyaddress", &listreceivedbyaddress, false, false },
{ "listreceivedbyaccount", &listreceivedbyaccount, false, false }, { "listreceivedbyaccount", &listreceivedbyaccount, false, false },
{ "backupwallet", &backupwallet, true, false }, { "backupwallet", &backupwallet, true, false },
{ "keypoolrefill", &keypoolrefill, true, false }, { "keypoolrefill", &keypoolrefill, true, false },
{ "walletpassphrase", &walletpassphrase, true, false }, { "walletpassphrase", &walletpassphrase, true, false },
{ "walletpassphrasechange", &walletpassphrasechange, false, false }, { "walletpassphrasechange", &walletpassphrasechange, false, false },
{ "walletlock", &walletlock, true, false }, { "walletlock", &walletlock, true, false },
{ "encryptwallet", &encryptwallet, false, false }, { "encryptwallet", &encryptwallet, false, false },
{ "validateaddress", &validateaddress, true, false }, { "validateaddress", &validateaddress, true, false },
{ "getbalance", &getbalance, false, false }, { "getbalance", &getbalance, false, false },
{ "move", &movecmd, false, false }, { "move", &movecmd, false, false },
{ "sendfrom", &sendfrom, false, false }, { "sendfrom", &sendfrom, false, false },
{ "sendmany", &sendmany, false, false }, { "sendmany", &sendmany, false, false },
{ "addmultisigaddress", &addmultisigaddress, false, false }, { "addmultisigaddress", &addmultisigaddress, false, false },
{ "createmultisig", &createmultisig, true, true }, { "createmultisig", &createmultisig, true, true },
{ "getrawmempool", &getrawmempool, true, false }, { "getrawmempool", &getrawmempool, true, false },
{ "getblock", &getblock, false, false }, { "getblock", &getblock, false, false },
{ "getblockhash", &getblockhash, false, false }, { "getblockhash", &getblockhash, false, false },
{ "gettransaction", &gettransaction, false, false }, { "gettransaction", &gettransaction, false, false },
{ "listtransactions", &listtransactions, false, false }, { "listtransactions", &listtransactions, false, false },
{ "listaddressgroupings", &listaddressgroupings, false, false }, { "listaddressgroupings", &listaddressgroupings, false, false },
{ "signmessage", &signmessage, false, false }, { "signmessage", &signmessage, false, false },
{ "verifymessage", &verifymessage, false, false }, { "verifymessage", &verifymessage, false, false },
{ "getwork", &getwork, true, false }, { "getwork", &getwork, true, false },
{ "listaccounts", &listaccounts, false, false }, { "listaccounts", &listaccounts, false, false },
{ "settxfee", &settxfee, false, false }, { "settxfee", &settxfee, false, false },
{ "getblocktemplate", &getblocktemplate, true, false }, { "getblocktemplate", &getblocktemplate, true, false },
{ "submitblock", &submitblock, false, false }, { "submitblock", &submitblock, false, false },
{ "listsinceblock", &listsinceblock, false, false }, { "listsinceblock", &listsinceblock, false, false },
{ "dumpprivkey", &dumpprivkey, true, false }, { "dumpprivkey", &dumpprivkey, true, false },
{ "importprivkey", &importprivkey, false, false }, { "importprivkey", &importprivkey, false, false },
{ "listunspent", &listunspent, false, false }, { "listunspent", &listunspent, false, false },
{ "getrawtransaction", &getrawtransaction, false, false }, { "getrawtransaction", &getrawtransaction, false, false },
{ "createrawtransaction", &createrawtransaction, false, false }, { "createrawtransaction", &createrawtransaction, false, false },
{ "decoderawtransaction", &decoderawtransaction, false, false }, { "decoderawtransaction", &decoderawtransaction, false, false },
{ "signrawtransaction", &signrawtransaction, false, false }, { "signrawtransaction", &signrawtransaction, false, false },
{ "sendrawtransaction", &sendrawtransaction, false, false }, { "sendrawtransaction", &sendrawtransaction, false, false },
{ "gettxoutsetinfo", &gettxoutsetinfo, true, false }, { "gettxoutsetinfo", &gettxoutsetinfo, true, false },
{ "gettxout", &gettxout, true, false }, { "gettxout", &gettxout, true, false },
{ "lockunspent", &lockunspent, false, false }, { "lockunspent", &lockunspent, false, false },
{ "listlockunspent", &listlockunspent, false, false }, { "listlockunspent", &listlockunspent, false, false },
}; };
CRPCTable::CRPCTable() CRPCTable::CRPCTable()
@ -1072,7 +1072,7 @@ json_spirit::Value CRPCTable::execute(const std::string &strMethod, const json_s
// Execute // Execute
Value result; Value result;
{ {
if (pcmd->unlocked) if (pcmd->threadSafe)
result = pcmd->actor(params, false); result = pcmd->actor(params, false);
else { else {
LOCK2(cs_main, pwalletMain->cs_wallet); LOCK2(cs_main, pwalletMain->cs_wallet);

2
src/bitcoinrpc.h

@ -95,7 +95,7 @@ public:
std::string name; std::string name;
rpcfn_type actor; rpcfn_type actor;
bool okSafeMode; bool okSafeMode;
bool unlocked; bool threadSafe;
}; };
/** /**

Loading…
Cancel
Save