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

Function handle_ping_in

connectd/multiplex.c:764–775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

762}
763
764static void handle_ping_in(struct peer *peer, const u8 *msg)
765{
766 u8 *pong;
767
768 if (!check_ping_make_pong(NULL, msg, &pong)) {
769 send_warning(peer, "Invalid ping %s", tal_hex(msg, msg));
770 return;
771 }
772
773 if (pong)
774 inject_peer_msg(peer, take(pong));
775}
776
777static void handle_ping_reply(struct peer *peer, const u8 *msg)
778{

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