| 512 | } |
| 513 | |
| 514 | static 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 | |
| 535 | static unsigned connectd_msg(struct subd *connectd, const u8 *msg, const int *fds) |
| 536 | { |
no test coverage detected