![]() |
Bitcoin ABC
0.22.12
P2P Digital Currency
|
#include <rpc/server.h>
#include <config.h>
#include <rpc/util.h>
#include <shutdown.h>
#include <sync.h>
#include <util/strencodings.h>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/signals2/signal.hpp>
#include <memory>
#include <set>
#include <unordered_map>
Go to the source code of this file.
Classes | |
struct | RPCCommandExecutionInfo |
struct | RPCServerInfo |
struct | RPCCommandExecution |
struct | CRPCSignals |
Functions | |
static bool fRPCInWarmup | GUARDED_BY (cs_rpcWarmup) = "RPC server started" |
static std::map< std::string, std::unique_ptr< RPCTimerBase > > deadlineTimers | GUARDED_BY (g_deadline_timers_mutex) |
static bool | ExecuteCommand (Config &config, const CRPCCommand &command, const JSONRPCRequest &request, UniValue &result, bool last_handler) |
static UniValue | help (Config &config, const JSONRPCRequest &jsonRequest) |
static UniValue | stop (const Config &config, const JSONRPCRequest &jsonRequest) |
static UniValue | uptime (const Config &config, const JSONRPCRequest &request) |
static UniValue | getrpcinfo (const Config &config, const JSONRPCRequest &request) |
void | StartRPC () |
void | InterruptRPC () |
void | StopRPC () |
bool | IsRPCRunning () |
Query whether RPC is running. More... | |
void | RpcInterruptionPoint () |
Throw JSONRPCError if RPC is not running. More... | |
void | SetRPCWarmupStatus (const std::string &newStatus) |
Set the RPC warmup status. More... | |
void | SetRPCWarmupFinished () |
Mark warmup as done. More... | |
bool | RPCIsInWarmup (std::string *outStatus) |
Returns the current warmup state. More... | |
bool | IsDeprecatedRPCEnabled (const ArgsManager &args, const std::string &method) |
static UniValue | JSONRPCExecOne (Config &config, RPCServer &rpcServer, JSONRPCRequest jreq, const UniValue &req) |
std::string | JSONRPCExecBatch (Config &config, RPCServer &rpcServer, const JSONRPCRequest &jreq, const UniValue &vReq) |
static JSONRPCRequest | transformNamedArguments (const JSONRPCRequest &in, const std::vector< std::string > &argNames) |
Process named arguments into a vector of positional arguments, based on the passed-in specification for the RPC call's arguments. More... | |
void | RPCSetTimerInterfaceIfUnset (RPCTimerInterface *iface) |
Set the factory function for timer, but only, if unset. More... | |
void | RPCSetTimerInterface (RPCTimerInterface *iface) |
Set the factory function for timers. More... | |
void | RPCUnsetTimerInterface (RPCTimerInterface *iface) |
Unset factory function for timers. More... | |
void | RPCRunLater (const std::string &name, std::function< void()> func, int64_t nSeconds) |
Run func nSeconds from now. More... | |
int | RPCSerializationFlags () |
Retrieves any serialization flags requested in command line argument. More... | |
Variables | |
static RecursiveMutex | cs_rpcWarmup |
static std::atomic< bool > | g_rpc_running {false} |
static RPCTimerInterface * | timerInterface = nullptr |
static Mutex | g_deadline_timers_mutex |
static RPCServerInfo | g_rpc_server_info |
static struct CRPCSignals | g_rpcSignals |
static const CRPCCommand | vRPCCommands [] |
CRPCTable | tableRPC |
|
static |
Definition at line 502 of file server.cpp.
|
static |
|
static |
|
static |
|
static |
Definition at line 175 of file server.cpp.
void InterruptRPC | ( | ) |
bool IsDeprecatedRPCEnabled | ( | const ArgsManager & | args, |
const std::string & | method | ||
) |
Definition at line 387 of file server.cpp.
bool IsRPCRunning | ( | ) |
Query whether RPC is running.
Definition at line 358 of file server.cpp.
std::string JSONRPCExecBatch | ( | Config & | config, |
RPCServer & | rpcServer, | ||
const JSONRPCRequest & | jreq, | ||
const UniValue & | vReq | ||
) |
Definition at line 415 of file server.cpp.
|
static |
Definition at line 396 of file server.cpp.
void RpcInterruptionPoint | ( | ) |
Throw JSONRPCError if RPC is not running.
Definition at line 362 of file server.cpp.
bool RPCIsInWarmup | ( | std::string * | outStatus | ) |
Returns the current warmup state.
Definition at line 379 of file server.cpp.
void RPCRunLater | ( | const std::string & | name, |
std::function< void()> | func, | ||
int64_t | nSeconds | ||
) |
Run func nSeconds from now.
Overrides previous timer <name> (if any).
Definition at line 544 of file server.cpp.
int RPCSerializationFlags | ( | ) |
Retrieves any serialization flags requested in command line argument.
Definition at line 559 of file server.cpp.
void RPCSetTimerInterface | ( | RPCTimerInterface * | iface | ) |
Set the factory function for timers.
Definition at line 534 of file server.cpp.
void RPCSetTimerInterfaceIfUnset | ( | RPCTimerInterface * | iface | ) |
Set the factory function for timer, but only, if unset.
Definition at line 528 of file server.cpp.
void RPCUnsetTimerInterface | ( | RPCTimerInterface * | iface | ) |
Unset factory function for timers.
Definition at line 538 of file server.cpp.
void SetRPCWarmupFinished | ( | ) |
Mark warmup as done.
RPC calls will be processed from now on.
Definition at line 373 of file server.cpp.
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 368 of file server.cpp.
void StartRPC | ( | ) |
|
static |
Definition at line 198 of file server.cpp.
void StopRPC | ( | ) |
Definition at line 351 of file server.cpp.
|
inlinestatic |
Process named arguments into a vector of positional arguments, based on the passed-in specification for the RPC call's arguments.
Definition at line 430 of file server.cpp.
|
static |
|
static |
Definition at line 23 of file server.cpp.
|
static |
Definition at line 31 of file server.cpp.
|
static |
Definition at line 24 of file server.cpp.
|
static |
Definition at line 48 of file server.cpp.
|
static |
CRPCTable tableRPC |
Definition at line 563 of file server.cpp.
|
static |
Definition at line 29 of file server.cpp.
|
static |
Definition at line 294 of file server.cpp.