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

Function send_custommsg

connectd/multiplex.c:749–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

747}
748
749void send_custommsg(struct daemon *daemon, const u8 *msg)
750{
751 struct node_id id;
752 u8 *custommsg;
753 struct peer *peer;
754
755 if (!fromwire_connectd_custommsg_out(tmpctx, msg, &id, &custommsg))
756 master_badmsg(WIRE_CONNECTD_CUSTOMMSG_OUT, msg);
757
758 /* Races can happen: this might be gone by now. */
759 peer = peer_htable_get(daemon->peers, &id);
760 if (peer)
761 inject_peer_msg(peer, take(custommsg));
762}
763
764static void handle_ping_in(struct peer *peer, const u8 *msg)
765{

Callers 1

recv_reqFunction · 0.85

Calls 2

inject_peer_msgFunction · 0.70
master_badmsgFunction · 0.50

Tested by

no test coverage detected