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

Function ExecuteCommand

src/rpc/server.cpp:471–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469}
470
471static bool ExecuteCommand(const CRPCCommand& command, const JSONRPCRequest& request, UniValue& result, bool last_handler)
472{
473 try
474 {
475 RPCCommandExecution execution(request.strMethod);
476 // Execute, convert arguments to array if necessary
477 if (request.params.isObject()) {
478 return command.actor(transformNamedArguments(request, command.argNames), result, last_handler);
479 } else {
480 return command.actor(request, result, last_handler);
481 }
482 }
483 catch (const std::exception& e)
484 {
485 throw JSONRPCError(RPC_MISC_ERROR, e.what());
486 }
487}
488
489std::vector<std::string> CRPCTable::listCommands() const
490{

Callers 1

ExecuteCommandsFunction · 0.85

Calls 3

transformNamedArgumentsFunction · 0.85
JSONRPCErrorFunction · 0.85
isObjectMethod · 0.80

Tested by

no test coverage detected