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

Function JSONRPCExecOne

src/rpc/server.cpp:359–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359static UniValue JSONRPCExecOne(JSONRPCRequest jreq, const UniValue& req)
360{
361 UniValue rpc_result(UniValue::VOBJ);
362
363 try {
364 jreq.parse(req);
365
366 UniValue result = tableRPC.execute(jreq);
367 rpc_result = JSONRPCReplyObj(result, NullUniValue, jreq.id);
368 }
369 catch (const UniValue& objError)
370 {
371 rpc_result = JSONRPCReplyObj(NullUniValue, objError, jreq.id);
372 }
373 catch (const std::exception& e)
374 {
375 rpc_result = JSONRPCReplyObj(NullUniValue,
376 JSONRPCError(RPC_PARSE_ERROR, e.what()), jreq.id);
377 }
378
379 return rpc_result;
380}
381
382std::string JSONRPCExecBatch(const JSONRPCRequest& jreq, const UniValue& vReq)
383{

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