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

Function handle_ping_in

connectd/multiplex.c:601–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

599}
600
601static void handle_ping_in(struct peer *peer, const u8 *msg)
602{
603 u8 *pong;
604
605 /* gossipd doesn't log IO, so we log it here. */
606 status_peer_io(LOG_IO_IN, &peer->id, msg);
607
608 if (!check_ping_make_pong(NULL, msg, &pong)) {
609 send_warning(peer, "Invalid ping %s", tal_hex(msg, msg));
610 return;
611 }
612
613 if (pong)
614 inject_peer_msg(peer, take(pong));
615}
616
617static void handle_ping_reply(struct peer *peer, const u8 *msg)
618{

Callers 1

handle_message_locallyFunction · 0.85

Calls 5

check_ping_make_pongFunction · 0.85
send_warningFunction · 0.85
tal_hexFunction · 0.85
inject_peer_msgFunction · 0.85
status_peer_ioFunction · 0.50

Tested by

no test coverage detected