![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#include "rpc/server.h"
#include "base58.h"
#include "init.h"
#include "random.h"
#include "sync.h"
#include "ui_interface.h"
#include "util.h"
#include "utilstrencodings.h"
#include <univalue.h>
#include <boost/bind.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
#include <boost/iostreams/concepts.hpp>
#include <boost/iostreams/stream.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/signals2/signal.hpp>
#include <boost/thread.hpp>
#include <boost/algorithm/string/case_conv.hpp>
Go to the source code of this file.
Classes | |
struct | CRPCSignals |
Functions | |
static std::string | rpcWarmupStatus ("RPC server started") |
void | RPCTypeCheck (const UniValue ¶ms, const list< UniValue::VType > &typesExpected, bool fAllowNull) |
void | RPCTypeCheckObj (const UniValue &o, const map< string, UniValue::VType > &typesExpected, bool fAllowNull) |
CAmount | AmountFromValue (const UniValue &value) |
UniValue | ValueFromAmount (const CAmount &amount) |
uint256 | ParseHashV (const UniValue &v, string strName) |
uint256 | ParseHashO (const UniValue &o, string strKey) |
vector< unsigned char > | ParseHexV (const UniValue &v, string strName) |
vector< unsigned char > | ParseHexO (const UniValue &o, string strKey) |
UniValue | help (const UniValue ¶ms, bool fHelp) |
UniValue | stop (const UniValue ¶ms, bool fHelp) |
bool | StartRPC () |
void | InterruptRPC () |
void | StopRPC () |
bool | IsRPCRunning () |
void | SetRPCWarmupStatus (const std::string &newStatus) |
void | SetRPCWarmupFinished () |
bool | RPCIsInWarmup (std::string *outStatus) |
static UniValue | JSONRPCExecOne (const UniValue &req) |
std::string | JSONRPCExecBatch (const UniValue &vReq) |
std::string | HelpExampleCli (const std::string &methodname, const std::string &args) |
std::string | HelpExampleRpc (const std::string &methodname, const std::string &args) |
void | RPCRegisterTimerInterface (RPCTimerInterface *iface) |
void | RPCUnregisterTimerInterface (RPCTimerInterface *iface) |
void | RPCRunLater (const std::string &name, boost::function< void(void)> func, int64_t nSeconds) |
Variables | |
static bool | fRPCRunning = false |
static bool | fRPCInWarmup = true |
static CCriticalSection | cs_rpcWarmup |
static std::vector< RPCTimerInterface * > | timerInterfaces |
static std::map< std::string, boost::shared_ptr< RPCTimerBase > > | deadlineTimers |
static struct CRPCSignals | g_rpcSignals |
static const CRPCCommand | vRPCCommands [] |
const CRPCTable | tableRPC |
Definition at line 110 of file server.cpp.
Referenced by createrawtransaction(), instantsendtoaddress(), movecmd(), sendfrom(), sendmany(), sendtoaddress(), and settxfee().
Definition at line 220 of file server.cpp.
Referenced by BitcoinGUI::createMenuBar(), and main().
std::string HelpExampleCli | ( | const std::string & | methodname, |
const std::string & | args | ||
) |
Definition at line 581 of file server.cpp.
Referenced by abandontransaction(), addmultisigaddress(), addnode(), backupwallet(), clearbanned(), createmultisig(), createrawtransaction(), debug(), decoderawtransaction(), decodescript(), disconnectnode(), dumphdinfo(), dumpprivkey(), dumpwallet(), encryptwallet(), estimatefee(), estimatepriority(), estimatesmartfee(), estimatesmartpriority(), fundrawtransaction(), generate(), getaccount(), getaccountaddress(), getaddednodeinfo(), getaddressbalance(), getaddressdeltas(), getaddressesbyaccount(), getaddressmempool(), getaddresstxids(), getaddressutxos(), getbalance(), getbestblockhash(), getblock(), getblockchaininfo(), getblockcount(), getblockhash(), getblockhashes(), getblockheader(), getblockheaders(), getblocktemplate(), getchaintips(), getconnectioncount(), getdifficulty(), getgenerate(), getgovernanceinfo(), getinfo(), getmempoolinfo(), getmininginfo(), getnettotals(), getnetworkhashps(), getnetworkinfo(), getnewaddress(), getpeerinfo(), getrawchangeaddress(), getrawmempool(), getrawtransaction(), getreceivedbyaccount(), getreceivedbyaddress(), getspentinfo(), getsuperblockbudget(), gettransaction(), gettxout(), gettxoutproof(), gettxoutsetinfo(), getwalletinfo(), importaddress(), importelectrumwallet(), importprivkey(), importpubkey(), importwallet(), instantsendtoaddress(), invalidateblock(), keypoolrefill(), listaccounts(), listaddressgroupings(), listbanned(), listlockunspent(), listreceivedbyaccount(), listreceivedbyaddress(), listsinceblock(), listtransactions(), listunspent(), lockunspent(), movecmd(), ping(), prioritisetransaction(), reconsiderblock(), sendfrom(), sendmany(), sendrawtransaction(), sendtoaddress(), sentinelping(), setaccount(), setban(), setgenerate(), settxfee(), signmessage(), signrawtransaction(), submitblock(), validateaddress(), verifychain(), verifymessage(), verifytxoutproof(), walletlock(), walletpassphrase(), and walletpassphrasechange().
std::string HelpExampleRpc | ( | const std::string & | methodname, |
const std::string & | args | ||
) |
Definition at line 586 of file server.cpp.
Referenced by abandontransaction(), addmultisigaddress(), addnode(), backupwallet(), clearbanned(), createmultisig(), createrawtransaction(), debug(), decoderawtransaction(), decodescript(), disconnectnode(), dumphdinfo(), dumpprivkey(), dumpwallet(), encryptwallet(), getaccount(), getaccountaddress(), getaddednodeinfo(), getaddressbalance(), getaddressdeltas(), getaddressesbyaccount(), getaddressmempool(), getaddresstxids(), getaddressutxos(), getbalance(), getbestblockhash(), getblock(), getblockchaininfo(), getblockcount(), getblockhash(), getblockhashes(), getblockheader(), getblockheaders(), getblocktemplate(), getchaintips(), getconnectioncount(), getdifficulty(), getgenerate(), getgovernanceinfo(), getinfo(), getmempoolinfo(), getmininginfo(), getnettotals(), getnetworkhashps(), getnetworkinfo(), getnewaddress(), getpeerinfo(), getrawchangeaddress(), getrawmempool(), getrawtransaction(), getreceivedbyaccount(), getreceivedbyaddress(), getspentinfo(), getsuperblockbudget(), gettransaction(), gettxout(), gettxoutproof(), gettxoutsetinfo(), getwalletinfo(), importaddress(), importelectrumwallet(), importprivkey(), importpubkey(), importwallet(), instantsendtoaddress(), invalidateblock(), keypoolrefill(), listaccounts(), listaddressgroupings(), listbanned(), listlockunspent(), listreceivedbyaccount(), listreceivedbyaddress(), listsinceblock(), listtransactions(), listunspent(), lockunspent(), movecmd(), ping(), prioritisetransaction(), reconsiderblock(), sendfrom(), sendmany(), sendrawtransaction(), sendtoaddress(), sentinelping(), setaccount(), setban(), setgenerate(), settxfee(), signmessage(), signrawtransaction(), submitblock(), validateaddress(), verifychain(), verifymessage(), verifytxoutproof(), walletlock(), walletpassphrase(), and walletpassphrasechange().
void InterruptRPC | ( | ) |
Definition at line 438 of file server.cpp.
Referenced by Interrupt().
bool IsRPCRunning | ( | ) |
Query whether RPC is running
Definition at line 452 of file server.cpp.
Referenced by getblocktemplate().
std::string JSONRPCExecBatch | ( | const UniValue & | vReq | ) |
Definition at line 532 of file server.cpp.
Referenced by HTTPReq_JSONRPC().
Definition at line 508 of file server.cpp.
Referenced by JSONRPCExecBatch().
Definition at line 143 of file server.cpp.
Referenced by createrawtransaction(), and signrawtransaction().
Definition at line 132 of file server.cpp.
Referenced by getrawtransaction(), getspentinfo(), gobject(), ParseHashO(), and voteraw().
vector<unsigned char> ParseHexO | ( | const UniValue & | o, |
string | strKey | ||
) |
Definition at line 156 of file server.cpp.
Referenced by signrawtransaction().
vector<unsigned char> ParseHexV | ( | const UniValue & | v, |
string | strName | ||
) |
Definition at line 147 of file server.cpp.
Referenced by createrawtransaction(), decodescript(), ParseHexO(), signrawtransaction(), and verifytxoutproof().
bool RPCIsInWarmup | ( | std::string * | outStatus | ) |
Definition at line 470 of file server.cpp.
Referenced by CheckWarmup().
void RPCRegisterTimerInterface | ( | RPCTimerInterface * | iface | ) |
Register factory function for timers
Definition at line 592 of file server.cpp.
Referenced by RPCConsole::RPCConsole(), and StartHTTPRPC().
void RPCRunLater | ( | const std::string & | name, |
boost::function< void(void)> | func, | ||
int64_t | nSeconds | ||
) |
Run func nSeconds from now. Overrides previous timer <name> (if any).
Definition at line 604 of file server.cpp.
Referenced by walletpassphrase().
void RPCTypeCheck | ( | const UniValue & | params, |
const list< UniValue::VType > & | typesExpected, | ||
bool | fAllowNull | ||
) |
Definition at line 70 of file server.cpp.
Referenced by createrawtransaction(), decoderawtransaction(), decodescript(), estimatefee(), estimatepriority(), estimatesmartfee(), estimatesmartpriority(), fundrawtransaction(), listunspent(), lockunspent(), sendrawtransaction(), setmocktime(), and signrawtransaction().
void RPCTypeCheckObj | ( | const UniValue & | o, |
const map< string, UniValue::VType > & | typesExpected, | ||
bool | fAllowNull | ||
) |
Definition at line 91 of file server.cpp.
Referenced by lockunspent(), and signrawtransaction().
void RPCUnregisterTimerInterface | ( | RPCTimerInterface * | iface | ) |
Unregister factory function for timers
Definition at line 597 of file server.cpp.
Referenced by StopHTTPRPC(), and RPCConsole::~RPCConsole().
|
static |
Referenced by CRPCTable::execute(), RPCIsInWarmup(), and SetRPCWarmupStatus().
void SetRPCWarmupFinished | ( | ) |
Definition at line 463 of file server.cpp.
Referenced by AppInit2().
void SetRPCWarmupStatus | ( | const std::string & | newStatus | ) |
Set the RPC warmup status. When this is done, all RPC calls will error out immediately with RPC_IN_WARMUP.
Definition at line 457 of file server.cpp.
Referenced by AppInit2().
bool StartRPC | ( | ) |
Definition at line 430 of file server.cpp.
Referenced by AppInitServers().
Definition at line 240 of file server.cpp.
Referenced by zapwallettxes.ZapWalletTXesTest::run_test().
void StopRPC | ( | ) |
Definition at line 445 of file server.cpp.
Referenced by PrepareShutdown().
Definition at line 122 of file server.cpp.
Referenced by AcentryToJSON(), estimatefee(), estimatesmartfee(), fundrawtransaction(), getbalance(), getgovernanceinfo(), getinfo(), getnetworkinfo(), getreceivedbyaccount(), getreceivedbyaddress(), gettransaction(), gettxout(), gettxoutsetinfo(), getunconfirmedbalance(), getwalletinfo(), listaccounts(), listaddressgroupings(), ListReceived(), ListTransactions(), listunspent(), mempoolInfoToJSON(), mempoolToJSON(), rest_getutxos(), and TxToJSON().
|
static |
Definition at line 35 of file server.cpp.
Referenced by CRPCTable::execute(), RPCIsInWarmup(), SetRPCWarmupFinished(), and SetRPCWarmupStatus().
|
static |
Definition at line 40 of file server.cpp.
Referenced by RPCRunLater(), and StopRPC().
|
static |
Definition at line 33 of file server.cpp.
Referenced by CRPCTable::execute(), RPCIsInWarmup(), and SetRPCWarmupFinished().
|
static |
Definition at line 32 of file server.cpp.
Referenced by InterruptRPC(), IsRPCRunning(), and StartRPC().
|
static |
const CRPCTable tableRPC |
Definition at line 614 of file server.cpp.
Referenced by CRPCTable::execute(), help(), HTTPReq_JSONRPC(), JSONRPCExecOne(), RPCExecutor::request(), and RPCConsole::setClientModel().
|
static |
Definition at line 37 of file server.cpp.
Referenced by RPCRegisterTimerInterface(), RPCRunLater(), and RPCUnregisterTimerInterface().
|
static |