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

Function send_custommsg

connectd/multiplex.c:586–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586void send_custommsg(struct daemon *daemon, const u8 *msg)
587{
588 struct node_id id;
589 u8 *custommsg;
590 struct peer *peer;
591
592 if (!fromwire_connectd_custommsg_out(tmpctx, msg, &id, &custommsg))
593 master_badmsg(WIRE_CONNECTD_CUSTOMMSG_OUT, msg);
594
595 /* Races can happen: this might be gone by now. */
596 peer = peer_htable_get(&daemon->peers, &id);
597 if (peer)
598 inject_peer_msg(peer, take(custommsg));
599}
600
601static void handle_ping_in(struct peer *peer, const u8 *msg)
602{

Callers 1

recv_reqFunction · 0.85

Calls 2

inject_peer_msgFunction · 0.85
master_badmsgFunction · 0.50

Tested by

no test coverage detected