Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/server.cpp
Show First 20 Lines • Show All 399 Lines • ▼ Show 20 Lines | |||||
bool RPCIsInWarmup(std::string *outStatus) { | bool RPCIsInWarmup(std::string *outStatus) { | ||||
LOCK(cs_rpcWarmup); | LOCK(cs_rpcWarmup); | ||||
if (outStatus) { | if (outStatus) { | ||||
*outStatus = rpcWarmupStatus; | *outStatus = rpcWarmupStatus; | ||||
} | } | ||||
return fRPCInWarmup; | return fRPCInWarmup; | ||||
} | } | ||||
bool IsDeprecatedRPCEnabled(const std::string &method) { | |||||
const std::vector<std::string> enabled_methods = | |||||
gArgs.GetArgs("-deprecatedrpc"); | |||||
return find(enabled_methods.begin(), enabled_methods.end(), method) != | |||||
enabled_methods.end(); | |||||
} | |||||
static UniValue JSONRPCExecOne(Config &config, RPCServer &rpcServer, | static UniValue JSONRPCExecOne(Config &config, RPCServer &rpcServer, | ||||
JSONRPCRequest jreq, const UniValue &req) { | JSONRPCRequest jreq, const UniValue &req) { | ||||
UniValue rpc_result(UniValue::VOBJ); | UniValue rpc_result(UniValue::VOBJ); | ||||
try { | try { | ||||
jreq.parse(req); | jreq.parse(req); | ||||
UniValue result = rpcServer.ExecuteCommand(config, jreq); | UniValue result = rpcServer.ExecuteCommand(config, jreq); | ||||
▲ Show 20 Lines • Show All 156 Lines • Show Last 20 Lines |