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

Function custommsg_cb

lightningd/connect_control.c:382–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380};
381
382static bool custommsg_cb(struct custommsg_payload *payload,
383 const char *buffer, const jsmntok_t *toks)
384{
385 const jsmntok_t *t_res;
386
387 if (!toks || !buffer)
388 return true;
389
390 t_res = json_get_member(buffer, toks, "result");
391
392 /* fail */
393 if (!t_res || !json_tok_streq(buffer, t_res, "continue"))
394 fatal("Plugin returned an invalid response to the "
395 "custommsg hook: %s", buffer);
396
397 /* call next hook */
398 return true;
399}
400
401static void custommsg_final(struct custommsg_payload *payload STEALS)
402{

Callers

nothing calls this directly

Calls 3

json_get_memberFunction · 0.85
json_tok_streqFunction · 0.85
fatalFunction · 0.70

Tested by

no test coverage detected