MCPcopy Create free account
hub / github.com/ElementsProject/elements / execute

Method execute

src/rpc/server.cpp:451–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449}
450
451UniValue CRPCTable::execute(const JSONRPCRequest &request) const
452{
453 // Return immediately if in warmup
454 {
455 LOCK(g_rpc_warmup_mutex);
456 if (fRPCInWarmup)
457 throw JSONRPCError(RPC_IN_WARMUP, rpcWarmupStatus);
458 }
459
460 // Find method
461 auto it = mapCommands.find(request.strMethod);
462 if (it != mapCommands.end()) {
463 UniValue result;
464 if (ExecuteCommands(it->second, request, result)) {
465 return result;
466 }
467 }
468 throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Method not found");
469}
470
471static bool ExecuteCommand(const CRPCCommand& command, const JSONRPCRequest& request, UniValue& result, bool last_handler)
472{

Callers 5

HTTPReq_JSONRPCFunction · 0.45
CallRPCMethod · 0.45
CallRPCMethod · 0.45
JSONRPCExecOneFunction · 0.45
executeRpcMethod · 0.45

Calls 4

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

Tested by 2

CallRPCMethod · 0.36
CallRPCMethod · 0.36