![]() |
Bitcoin Core 31.1.0
P2P Digital Currency
|
#include <bitcoin-build-config.h>#include <rpc/server.h>#include <common/args.h>#include <common/system.h>#include <logging.h>#include <node/context.h>#include <node/kernel_notifications.h>#include <rpc/server_util.h>#include <rpc/util.h>#include <sync.h>#include <util/signalinterrupt.h>#include <util/strencodings.h>#include <util/string.h>#include <util/time.h>#include <validation.h>#include <algorithm>#include <cassert>#include <chrono>#include <memory>#include <mutex>#include <string_view>#include <unordered_map>Go to the source code of this file.
Classes | |
| struct | RPCCommandExecutionInfo |
| struct | RPCServerInfo |
| struct | RPCCommandExecution |
Functions | |
| static bool fRPCInWarmup | GUARDED_BY (g_rpc_warmup_mutex) = "RPC server started" |
| static bool | ExecuteCommand (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 | SetRPCWarmupStarting () |
| void | SetRPCWarmupFinished () |
| bool | RPCIsInWarmup (std::string *outStatus) |
| bool | IsDeprecatedRPCEnabled (const std::string &method) |
| UniValue | JSONRPCExec (const JSONRPCRequest &jreq, bool catch_errors) |
| 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 std::vector< const CRPCCommand * > &commands, const JSONRPCRequest &request, UniValue &result) |
| std::vector< std::string > | SplitString (std::string_view str, char sep) |
Variables | |
| static GlobalMutex | g_rpc_warmup_mutex |
| static std::atomic< bool > | g_rpc_running {false} |
| static RPCServerInfo | g_rpc_server_info |
| static const CRPCCommand | vRPCCommands [] |
| CRPCTable | tableRPC |
|
static |
Definition at line 502 of file server.cpp.
|
static |
Definition at line 472 of file server.cpp.
|
static |
|
static |
|
static |
Definition at line 119 of file server.cpp.
| void InterruptRPC | ( | ) |
| bool IsDeprecatedRPCEnabled | ( | const std::string & | method | ) |
| bool IsRPCRunning | ( | ) |
Query whether RPC is running.
Definition at line 302 of file server.cpp.
| UniValue JSONRPCExec | ( | const JSONRPCRequest & | jreq, |
| bool | catch_errors ) |
Definition at line 346 of file server.cpp.
| void RpcInterruptionPoint | ( | ) |
Throw JSONRPCError if RPC is not running.
Definition at line 307 of file server.cpp.
| bool RPCIsInWarmup | ( | std::string * | outStatus | ) |
| void SetRPCWarmupFinished | ( | ) |
Definition at line 324 of file server.cpp.
| void SetRPCWarmupStarting | ( | ) |
| 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 312 of file server.cpp.
|
inlinenodiscard |
| void StartRPC | ( | ) |
|
static |
Definition at line 145 of file server.cpp.
| void StopRPC | ( | ) |
Definition at line 290 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 368 of file server.cpp.
|
static |
|
static |
Definition at line 35 of file server.cpp.
|
static |
Definition at line 52 of file server.cpp.
|
static |
Definition at line 34 of file server.cpp.
| CRPCTable tableRPC |
Definition at line 544 of file server.cpp.
|
static |
Definition at line 238 of file server.cpp.