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

Function send_custommsg

connectd/multiplex.c:819–832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

817}
818
819void send_custommsg(struct daemon *daemon, const u8 *msg)
820{
821 struct node_id id;
822 u8 *custommsg;
823 struct peer *peer;
824
825 if (!fromwire_connectd_custommsg_out(tmpctx, msg, &id, &custommsg))
826 master_badmsg(WIRE_CONNECTD_CUSTOMMSG_OUT, msg);
827
828 /* Races can happen: this might be gone by now. */
829 peer = peer_htable_get(daemon->peers, &id);
830 if (peer)
831 inject_peer_msg(peer, take(custommsg));
832}
833
834static void handle_ping_in(struct peer *peer, const u8 *msg)
835{

Callers 1

recv_reqFunction · 0.85

Calls 2

inject_peer_msgFunction · 0.70
master_badmsgFunction · 0.50

Tested by

no test coverage detected