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

Function JSONRPCReplyObj

src/rpcprotocol.cpp:40–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

JSONRPCExecOneFunction · 0.85
JSONRPCReplyFunction · 0.85

Calls 3

PairFunction · 0.85
isNullMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected