MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / execute

Method execute

src/rpc/server.cpp:482–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480}
481
482UniValue CRPCTable::execute(const JSONRPCRequest &request) const
483{
484 // Return immediately if in warmup
485 {
486 LOCK(g_rpc_warmup_mutex);
487 if (fRPCInWarmup)
488 throw JSONRPCError(RPC_IN_WARMUP, rpcWarmupStatus);
489 }
490
491 // Find method
492 auto it = mapCommands.find(request.strMethod);
493 if (it != mapCommands.end()) {
494 UniValue result;
495 if (ExecuteCommands(it->second, request, result)) {
496 return result;
497 }
498 }
499 throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Method not found");
500}
501
502static bool ExecuteCommand(const CRPCCommand& command, const JSONRPCRequest& request, UniValue& result, bool last_handler)
503{

Callers 11

check_keymetaMethod · 0.45
get_flagsMethod · 0.45
check_last_hardenedMethod · 0.45
run_testMethod · 0.45
TransformParamsMethod · 0.45
CallRPCMethod · 0.45
CallRPCMethod · 0.45
JSONRPCExecFunction · 0.45
executeRpcMethod · 0.45

Calls 4

JSONRPCErrorFunction · 0.85
ExecuteCommandsFunction · 0.85
findMethod · 0.80
endMethod · 0.45

Tested by 3

TransformParamsMethod · 0.36
CallRPCMethod · 0.36
CallRPCMethod · 0.36