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

Function json_add_tok

common/json_stream.c:370–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368
369
370void json_add_tok(struct json_stream *result, const char *fieldname,
371 const jsmntok_t *tok, const char *buffer)
372{
373 char *space;
374 assert(tok->type != JSMN_UNDEFINED);
375
376 space = json_member_direct(result, fieldname, json_tok_full_len(tok));
377 memcpy(space, json_tok_full(buffer, tok), json_tok_full_len(tok));
378}
379
380void json_add_jsonrpc_errcode(struct json_stream *result, const char *fieldname,
381 enum jsonrpc_errcode code)

Callers 11

plugin_notify_cbFunction · 0.85
testrpc_cbFunction · 0.85
add_new_entryFunction · 0.85
after_recover_rpcFunction · 0.85
listinvoices_doneFunction · 0.85
listsendpays_doneFunction · 0.85
listforwards_doneFunction · 0.85
json_fundchannelFunction · 0.85
fundchannel_get_resultFunction · 0.85

Calls 3

json_member_directFunction · 0.85
json_tok_full_lenFunction · 0.70
json_tok_fullFunction · 0.70

Tested by 1

testrpc_cbFunction · 0.68