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

Function handle_custommsg_in

lightningd/connect_control.c:402–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400 struct custommsg_payload *);
401
402static void handle_custommsg_in(struct lightningd *ld, const u8 *msg)
403{
404 struct custommsg_payload *p = tal(NULL, struct custommsg_payload);
405
406 p->ld = ld;
407 if (!fromwire_connectd_custommsg_in(p, msg, &p->peer_id, &p->msg)) {
408 log_broken(ld->log, "Malformed custommsg: %s",
409 tal_hex(tmpctx, msg));
410 tal_free(p);
411 return;
412 }
413
414 notify_custommsg(ld, &p->peer_id, p->msg);
415 plugin_hook_call_custommsg(ld, fromwire_peektype(p->msg), NULL, p);
416}
417
418static void handle_onionmsg_forward_fail(struct lightningd *ld, const u8 *msg)
419{

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