| 578 | |
| 579 | |
| 580 | static 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 | |
| 600 | string JSONRPCExecBatch(const UniValue& vReq) |
| 601 | { |
no test coverage detected