MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / JSONRPCExecOne

Function JSONRPCExecOne

src/rpc/server.cpp:392–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392static UniValue JSONRPCExecOne(JSONRPCRequest jreq, const UniValue& req)
393{
394 UniValue rpc_result(UniValue::VOBJ);
395
396 try {
397 jreq.parse(req);
398
399 UniValue result = tableRPC.execute(jreq);
400 rpc_result = JSONRPCReplyObj(result, NullUniValue, jreq.id);
401 }
402 catch (const UniValue& objError)
403 {
404 rpc_result = JSONRPCReplyObj(NullUniValue, objError, jreq.id);
405 }
406 catch (const std::exception& e)
407 {
408 rpc_result = JSONRPCReplyObj(NullUniValue,
409 JSONRPCError(RPC_PARSE_ERROR, e.what()), jreq.id);
410 }
411
412 return rpc_result;
413}
414
415std::string JSONRPCExecBatch(const JSONRPCRequest& jreq, const UniValue& vReq)
416{

Callers 1

JSONRPCExecBatchFunction · 0.85

Calls 5

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

Tested by

no test coverage detected