MCPcopy Create free account
hub / github.com/LUX-Core/lux / JSONRPCExecOne

Function JSONRPCExecOne

src/rpcserver.cpp:580–598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578
579
580static UniValue JSONRPCExecOne(const UniValue& req)
581{
582 UniValue rpc_result(UniValue::VOBJ);
583
584 JSONRequest jreq(NULL);
585 try {
586 jreq.parse(req);
587
588 UniValue result = tableRPC.execute(jreq.strMethod, jreq.params);
589 rpc_result = JSONRPCReplyObj(result, NullUniValue, jreq.id);
590 } catch (UniValue& objError) {
591 rpc_result = JSONRPCReplyObj(NullUniValue, objError, jreq.id);
592 } catch (std::exception& e) {
593 rpc_result = JSONRPCReplyObj(NullUniValue,
594 JSONRPCError(RPC_PARSE_ERROR, e.what()), jreq.id);
595 }
596
597 return rpc_result;
598}
599
600string JSONRPCExecBatch(const UniValue& vReq)
601{

Callers 1

JSONRPCExecBatchFunction · 0.85

Calls 5

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

Tested by

no test coverage detected