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

Function handle_ping_latency

lightningd/connect_control.c:568–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

566}
567
568static void handle_ping_latency(struct lightningd *ld, const u8 *msg)
569{
570 struct node_id id;
571 u64 nsec;
572
573 if (!fromwire_connectd_ping_latency(msg, &id, &nsec)) {
574 log_broken(ld->log, "Malformed ping_latency: %s",
575 tal_hex(tmpctx, msg));
576 return;
577 }
578
579 log_peer_trace(ld->log, &id, "Ping latency: %"PRIu64"nsec",
580 nsec);
581
582 wallet_save_network_event(ld, &id,
583 NETWORK_EVENT_PING,
584 NULL,
585 nsec,
586 false);
587}
588
589static unsigned connectd_msg(struct subd *connectd, const u8 *msg, const int *fds)
590{

Callers 1

connectd_msgFunction · 0.85

Calls 2

tal_hexFunction · 0.85

Tested by

no test coverage detected