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

Function handle_custommsg_in

lightningd/connect_control.c:425–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423 struct custommsg_payload *);
424
425static void handle_custommsg_in(struct lightningd *ld, const u8 *msg)
426{
427 struct custommsg_payload *p = tal(NULL, struct custommsg_payload);
428
429 p->ld = ld;
430 if (!fromwire_connectd_custommsg_in(p, msg, &p->peer_id, &p->msg)) {
431 log_broken(ld->log, "Malformed custommsg: %s",
432 tal_hex(tmpctx, msg));
433 tal_free(p);
434 return;
435 }
436
437 notify_custommsg(ld, &p->peer_id, p->msg);
438 plugin_hook_call_custommsg(ld, fromwire_peektype(p->msg), NULL, p);
439}
440
441static void handle_onionmsg_forward_fail(struct lightningd *ld, const u8 *msg)
442{

Callers 1

connectd_msgFunction · 0.85

Calls 4

tal_hexFunction · 0.85
tal_freeFunction · 0.85
notify_custommsgFunction · 0.85
fromwire_peektypeFunction · 0.85

Tested by

no test coverage detected