#include <rpc/server.h>
#include <common/args.h>
#include <config.h>
#include <logging.h>
#include <rpc/util.h>
#include <shutdown.h>
#include <sync.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <util/time.h>
#include <boost/signals2/signal.hpp>
#include <cassert>
#include <chrono>
#include <memory>
#include <mutex>
#include <set>
#include <unordered_map>
Go to the source code of this file.
|
static bool fRPCInWarmup | GUARDED_BY (g_rpc_warmup_mutex) = "RPC server started" |
|
static std::map< std::string, std::unique_ptr< RPCTimerBase > > deadlineTimers | GUARDED_BY (g_deadline_timers_mutex) |
|
static bool | ExecuteCommand (const Config &config, const CRPCCommand &command, const JSONRPCRequest &request, UniValue &result, bool last_handler) |
|
static RPCHelpMan | help () |
|
static RPCHelpMan | stop () |
|
static RPCHelpMan | uptime () |
|
static RPCHelpMan | getrpcinfo () |
|
void | StartRPC () |
|
void | InterruptRPC () |
|
void | StopRPC () |
|
bool | IsRPCRunning () |
| Query whether RPC is running.
|
|
void | RpcInterruptionPoint () |
| Throw JSONRPCError if RPC is not running.
|
|
void | SetRPCWarmupStatus (const std::string &newStatus) |
| Set the RPC warmup status.
|
|
void | SetRPCWarmupFinished () |
| Mark warmup as done.
|
|
bool | RPCIsInWarmup (std::string *outStatus) |
| Returns the current warmup state.
|
|
bool | IsDeprecatedRPCEnabled (const ArgsManager &args, const std::string &method) |
|
static UniValue | JSONRPCExecOne (const Config &config, RPCServer &rpcServer, JSONRPCRequest jreq, const UniValue &req) |
|
std::string | JSONRPCExecBatch (const Config &config, RPCServer &rpcServer, const JSONRPCRequest &jreq, const UniValue &vReq) |
|
static JSONRPCRequest | transformNamedArguments (const JSONRPCRequest &in, const std::vector< std::pair< std::string, bool > > &argNames) |
| Process named arguments into a vector of positional arguments, based on the passed-in specification for the RPC call's arguments.
|
|
static bool | ExecuteCommands (const Config &config, const std::vector< const CRPCCommand * > &commands, const JSONRPCRequest &request, UniValue &result) |
|
void | RPCSetTimerInterfaceIfUnset (RPCTimerInterface *iface) |
| Set the factory function for timer, but only, if unset.
|
|
void | RPCSetTimerInterface (RPCTimerInterface *iface) |
| Set the factory function for timers.
|
|
void | RPCUnsetTimerInterface (RPCTimerInterface *iface) |
| Unset factory function for timers.
|
|
void | RPCRunLater (const std::string &name, std::function< void()> func, int64_t nSeconds) |
| Run func nSeconds from now.
|
|
int | RPCSerializationFlags () |
| Retrieves any serialization flags requested in command line argument.
|
|
◆ SteadyClock
◆ ExecuteCommand()
◆ ExecuteCommands()
◆ getrpcinfo()
◆ GUARDED_BY() [1/2]
◆ GUARDED_BY() [2/2]
◆ help()
◆ InterruptRPC()
◆ IsDeprecatedRPCEnabled()
bool IsDeprecatedRPCEnabled |
( |
const ArgsManager & |
args, |
|
|
const std::string & |
method |
|
) |
| |
◆ IsRPCRunning()
Query whether RPC is running.
Definition at line 378 of file server.cpp.
◆ JSONRPCExecBatch()
◆ JSONRPCExecOne()
◆ RpcInterruptionPoint()
void RpcInterruptionPoint |
( |
| ) |
|
Throw JSONRPCError if RPC is not running.
Definition at line 382 of file server.cpp.
◆ RPCIsInWarmup()
bool RPCIsInWarmup |
( |
std::string * |
outStatus | ) |
|
Returns the current warmup state.
Definition at line 399 of file server.cpp.
◆ RPCRunLater()
Run func nSeconds from now.
Overrides previous timer <name> (if any).
Definition at line 664 of file server.cpp.
◆ RPCSerializationFlags()
int RPCSerializationFlags |
( |
| ) |
|
Retrieves any serialization flags requested in command line argument.
Definition at line 679 of file server.cpp.
◆ RPCSetTimerInterface()
Set the factory function for timers.
Definition at line 654 of file server.cpp.
◆ RPCSetTimerInterfaceIfUnset()
Set the factory function for timer, but only, if unset.
Definition at line 648 of file server.cpp.
◆ RPCUnsetTimerInterface()
Unset factory function for timers.
Definition at line 658 of file server.cpp.
◆ SetRPCWarmupFinished()
void SetRPCWarmupFinished |
( |
| ) |
|
Mark warmup as done.
RPC calls will be processed from now on.
Definition at line 393 of file server.cpp.
◆ SetRPCWarmupStatus()
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 388 of file server.cpp.
◆ StartRPC()
◆ stop()
◆ StopRPC()
◆ transformNamedArguments()
Process named arguments into a vector of positional arguments, based on the passed-in specification for the RPC call's arguments.
Definition at line 449 of file server.cpp.
◆ uptime()
◆ g_deadline_timers_mutex
◆ g_rpc_running
◆ g_rpc_server_info
◆ g_rpc_warmup_mutex
◆ g_rpcSignals
◆ tableRPC
◆ timerInterface
◆ vRPCCommands
Initial value:= {
}
static RPCHelpMan uptime()
static RPCHelpMan getrpcinfo()
Definition at line 310 of file server.cpp.