MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / JSONRPCReplyObj

Function JSONRPCReplyObj

src/rpc/core/rpcprotocol.cpp:225–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225Object JSONRPCReplyObj(const Value& result, const Value& error, const Value& id) {
226 Object reply;
227 if (error.type() != null_type)
228 reply.push_back(Pair("result", Value::null));
229 else
230 reply.push_back(Pair("result", result));
231 reply.push_back(Pair("error", error));
232 reply.push_back(Pair("id", id));
233 return reply;
234}
235
236string JSONRPCReply(const Value& result, const Value& error, const Value& id) {
237 Object reply = JSONRPCReplyObj(result, error, id);

Callers 2

JSONRPCExecOneFunction · 0.85
JSONRPCReplyFunction · 0.85

Calls 3

PairClass · 0.85
typeMethod · 0.80
push_backMethod · 0.80

Tested by

no test coverage detected