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

Function send_custommsg

connectd/multiplex.c:835–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

833}
834
835void send_custommsg(struct daemon *daemon, const u8 *msg)
836{
837 struct node_id id;
838 u8 *custommsg;
839 struct peer *peer;
840
841 if (!fromwire_connectd_custommsg_out(tmpctx, msg, &id, &custommsg))
842 master_badmsg(WIRE_CONNECTD_CUSTOMMSG_OUT, msg);
843
844 /* Races can happen: this might be gone by now. */
845 peer = peer_htable_get(daemon->peers, &id);
846 if (peer)
847 inject_peer_msg(peer, take(custommsg));
848}
849
850static void handle_ping_in(struct peer *peer, const u8 *msg)
851{

Callers 1

recv_reqFunction · 0.85

Calls 2

inject_peer_msgFunction · 0.70
master_badmsgFunction · 0.50

Tested by

no test coverage detected