| 566 | } |
| 567 | |
| 568 | static 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 | |
| 589 | static unsigned connectd_msg(struct subd *connectd, const u8 *msg, const int *fds) |
| 590 | { |
no test coverage detected