| 37 | } |
| 38 | |
| 39 | UniValue JSONRPCReplyObj(const UniValue &result, const UniValue &error, |
| 40 | const UniValue &id) { |
| 41 | UniValue reply(UniValue::VOBJ); |
| 42 | if (!error.isNull()) { |
| 43 | reply.pushKV("result", NullUniValue); |
| 44 | } else { |
| 45 | reply.pushKV("result", result); |
| 46 | } |
| 47 | reply.pushKV("error", error); |
| 48 | reply.pushKV("id", id); |
| 49 | return reply; |
| 50 | } |
| 51 | |
| 52 | std::string JSONRPCReply(const UniValue &result, const UniValue &error, |
| 53 | const UniValue &id) { |
no test coverage detected