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

Function handle_ping_in

connectd/multiplex.c:850–861  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

848}
849
850static void handle_ping_in(struct peer *peer, const u8 *msg)
851{
852 u8 *pong;
853
854 if (!check_ping_make_pong(NULL, msg, &pong)) {
855 send_warning(peer, "Invalid ping %s", tal_hex(msg, msg));
856 return;
857 }
858
859 if (pong)
860 inject_peer_msg(peer, take(pong));
861}
862
863static void handle_ping_reply(struct peer *peer, const u8 *msg)
864{

Callers 1

handle_message_locallyFunction · 0.85

Calls 4

check_ping_make_pongFunction · 0.85
send_warningFunction · 0.85
tal_hexFunction · 0.85
inject_peer_msgFunction · 0.70

Tested by

no test coverage detected