@@ -309,9 +309,6 @@ static const CRPCCommand vRPCCommands[] =
309309 { " rawtransactions" , " getrawtransaction" , &getrawtransaction, true },
310310 { " rawtransactions" , " sendrawtransaction" , &sendrawtransaction, false },
311311 { " rawtransactions" , " signrawtransaction" , &signrawtransaction, false }, /* uses wallet if enabled */
312- #ifdef ENABLE_WALLET
313- { " rawtransactions" , " fundrawtransaction" , &fundrawtransaction, false },
314- #endif
315312
316313 /* Utility functions */
317314 { " util" , " createmultisig" , &createmultisig, true },
@@ -326,54 +323,6 @@ static const CRPCCommand vRPCCommands[] =
326323 { " hidden" , " invalidateblock" , &invalidateblock, true },
327324 { " hidden" , " reconsiderblock" , &reconsiderblock, true },
328325 { " hidden" , " setmocktime" , &setmocktime, true },
329- #ifdef ENABLE_WALLET
330- { " hidden" , " resendwallettransactions" , &resendwallettransactions, true },
331- #endif
332-
333- #ifdef ENABLE_WALLET
334- /* Wallet */
335- { " wallet" , " addmultisigaddress" , &addmultisigaddress, true },
336- { " wallet" , " backupwallet" , &backupwallet, true },
337- { " wallet" , " dumpprivkey" , &dumpprivkey, true },
338- { " wallet" , " dumpwallet" , &dumpwallet, true },
339- { " wallet" , " encryptwallet" , &encryptwallet, true },
340- { " wallet" , " getaccountaddress" , &getaccountaddress, true },
341- { " wallet" , " getaccount" , &getaccount, true },
342- { " wallet" , " getaddressesbyaccount" , &getaddressesbyaccount, true },
343- { " wallet" , " getbalance" , &getbalance, false },
344- { " wallet" , " getnewaddress" , &getnewaddress, true },
345- { " wallet" , " getrawchangeaddress" , &getrawchangeaddress, true },
346- { " wallet" , " getreceivedbyaccount" , &getreceivedbyaccount, false },
347- { " wallet" , " getreceivedbyaddress" , &getreceivedbyaddress, false },
348- { " wallet" , " gettransaction" , &gettransaction, false },
349- { " wallet" , " abandontransaction" , &abandontransaction, false },
350- { " wallet" , " getunconfirmedbalance" , &getunconfirmedbalance, false },
351- { " wallet" , " getwalletinfo" , &getwalletinfo, false },
352- { " wallet" , " importprivkey" , &importprivkey, true },
353- { " wallet" , " importwallet" , &importwallet, true },
354- { " wallet" , " importaddress" , &importaddress, true },
355- { " wallet" , " importpubkey" , &importpubkey, true },
356- { " wallet" , " keypoolrefill" , &keypoolrefill, true },
357- { " wallet" , " listaccounts" , &listaccounts, false },
358- { " wallet" , " listaddressgroupings" , &listaddressgroupings, false },
359- { " wallet" , " listlockunspent" , &listlockunspent, false },
360- { " wallet" , " listreceivedbyaccount" , &listreceivedbyaccount, false },
361- { " wallet" , " listreceivedbyaddress" , &listreceivedbyaddress, false },
362- { " wallet" , " listsinceblock" , &listsinceblock, false },
363- { " wallet" , " listtransactions" , &listtransactions, false },
364- { " wallet" , " listunspent" , &listunspent, false },
365- { " wallet" , " lockunspent" , &lockunspent, true },
366- { " wallet" , " move" , &movecmd, false },
367- { " wallet" , " sendfrom" , &sendfrom, false },
368- { " wallet" , " sendmany" , &sendmany, false },
369- { " wallet" , " sendtoaddress" , &sendtoaddress, false },
370- { " wallet" , " setaccount" , &setaccount, true },
371- { " wallet" , " settxfee" , &settxfee, true },
372- { " wallet" , " signmessage" , &signmessage, true },
373- { " wallet" , " walletlock" , &walletlock, true },
374- { " wallet" , " walletpassphrasechange" , &walletpassphrasechange, true },
375- { " wallet" , " walletpassphrase" , &walletpassphrase, true },
376- #endif // ENABLE_WALLET
377326};
378327
379328CRPCTable::CRPCTable ()
@@ -396,6 +345,20 @@ const CRPCCommand *CRPCTable::operator[](const std::string &name) const
396345 return (*it).second ;
397346}
398347
348+ bool CRPCTable::appendCommand (const std::string& name, const CRPCCommand* pcmd)
349+ {
350+ if (IsRPCRunning ())
351+ return false ;
352+
353+ // don't allow overwriting for now
354+ map<string, const CRPCCommand*>::const_iterator it = mapCommands.find (name);
355+ if (it != mapCommands.end ())
356+ return false ;
357+
358+ mapCommands[name] = pcmd;
359+ return true ;
360+ }
361+
399362bool StartRPC ()
400363{
401364 LogPrint (" rpc" , " Starting RPC\n " );
@@ -573,4 +536,4 @@ void RPCRunLater(const std::string& name, boost::function<void(void)> func, int6
573536 deadlineTimers.insert (std::make_pair (name, boost::shared_ptr<RPCTimerBase>(timerInterface->NewTimer (func, nSeconds*1000 ))));
574537}
575538
576- const CRPCTable tableRPC;
539+ CRPCTable tableRPC;
0 commit comments