MCPcopy Create free account
hub / github.com/ElementsProject/lightning / json_to_jsonrpc_errcode

Function json_to_jsonrpc_errcode

common/json_parse.c:114–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114bool json_to_jsonrpc_errcode(const char *buffer, const jsmntok_t *tok,
115 enum jsonrpc_errcode *errcode)
116{
117 s64 tmp;
118
119 if (!json_to_s64(buffer, tok, &tmp))
120 return false;
121 *errcode = tmp;
122
123 /* Just in case it doesn't fit. */
124 if (*errcode != tmp)
125 return false;
126
127 return true;
128}
129
130bool json_to_sha256(const char *buffer, const jsmntok_t *tok, struct sha256 *dest)
131{

Callers 2

Calls 1

json_to_s64Function · 0.50

Tested by

no test coverage detected