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

Function handle_custommsg_in

lightningd/connect_control.c:470–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468 struct custommsg_payload *);
469
470static void handle_custommsg_in(struct lightningd *ld, const u8 *msg)
471{
472 struct custommsg_payload *p = tal(NULL, struct custommsg_payload);
473
474 if (!fromwire_connectd_custommsg_in(p, msg, &p->peer_id, &p->msg)) {
475 log_broken(ld->log, "Malformed custommsg: %s",
476 tal_hex(tmpctx, msg));
477 tal_free(p);
478 return;
479 }
480
481 plugin_hook_call_custommsg(ld, NULL, p);
482}
483
484static unsigned connectd_msg(struct subd *connectd, const u8 *msg, const int *fds)
485{

Callers 1

connectd_msgFunction · 0.85

Calls 2

tal_hexFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected