MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / JSONRPCExecOne

Function JSONRPCExecOne

src/rpc/server.cpp:419–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417}
418
419static UniValue JSONRPCExecOne(const Config &config, RPCServer &rpcServer,
420 JSONRPCRequest jreq, const UniValue &req) {
421 UniValue rpc_result(UniValue::VOBJ);
422
423 try {
424 jreq.parse(req);
425
426 UniValue result = rpcServer.ExecuteCommand(config, jreq);
427 rpc_result = JSONRPCReplyObj(result, NullUniValue, jreq.id);
428 } catch (const UniValue &objError) {
429 rpc_result = JSONRPCReplyObj(NullUniValue, objError, jreq.id);
430 } catch (const std::exception &e) {
431 rpc_result = JSONRPCReplyObj(
432 NullUniValue, JSONRPCError(RPC_PARSE_ERROR, e.what()), jreq.id);
433 }
434
435 return rpc_result;
436}
437
438std::string JSONRPCExecBatch(const Config &config, RPCServer &rpcServer,
439 const JSONRPCRequest &jreq, const UniValue &vReq) {

Callers 1

JSONRPCExecBatchFunction · 0.85

Calls 5

JSONRPCReplyObjFunction · 0.85
JSONRPCErrorFunction · 0.85
ExecuteCommandMethod · 0.80
parseMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected