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

Function JSONRPCExecOne

src/rpcserver.cpp:469–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467}
468
469static UniValue JSONRPCExecOne(const UniValue& req)
470{
471 UniValue rpc_result(UniValue::VOBJ);
472
473 JSONRequest jreq;
474 try {
475 jreq.parse(req);
476
477 UniValue result = tableRPC.execute(jreq.strMethod, jreq.params);
478 rpc_result = JSONRPCReplyObj(result, NullUniValue, jreq.id);
479 }
480 catch (const UniValue& objError)
481 {
482 rpc_result = JSONRPCReplyObj(NullUniValue, objError, jreq.id);
483 }
484 catch (const std::exception& e)
485 {
486 rpc_result = JSONRPCReplyObj(NullUniValue,
487 JSONRPCError(RPC_PARSE_ERROR, e.what()), jreq.id);
488 }
489
490 return rpc_result;
491}
492
493std::string JSONRPCExecBatch(const UniValue& vReq)
494{

Callers 1

JSONRPCExecBatchFunction · 0.85

Calls 4

JSONRPCReplyObjFunction · 0.85
JSONRPCErrorFunction · 0.85
parseMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected