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

Function handle_ping_latency

lightningd/connect_control.c:514–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512}
513
514static void handle_ping_latency(struct lightningd *ld, const u8 *msg)
515{
516 struct node_id id;
517 u64 nsec;
518
519 if (!fromwire_connectd_ping_latency(msg, &id, &nsec)) {
520 log_broken(ld->log, "Malformed ping_latency: %s",
521 tal_hex(tmpctx, msg));
522 return;
523 }
524
525 log_peer_trace(ld->log, &id, "Ping latency: %"PRIu64"nsec",
526 nsec);
527
528 wallet_save_network_event(ld, &id,
529 NETWORK_EVENT_PING,
530 NULL,
531 nsec,
532 false);
533}
534
535static unsigned connectd_msg(struct subd *connectd, const u8 *msg, const int *fds)
536{

Callers 1

connectd_msgFunction · 0.85

Calls 2

tal_hexFunction · 0.85

Tested by

no test coverage detected