~ connectd's input handler is very simple. */
| 287 | |
| 288 | /*~ connectd's input handler is very simple. */ |
| 289 | static struct io_plan *connectd_req(struct io_conn *conn, |
| 290 | const u8 *msg, |
| 291 | struct daemon *daemon) |
| 292 | { |
| 293 | enum connectd_gossipd_wire t = fromwire_peektype(msg); |
| 294 | |
| 295 | switch (t) { |
| 296 | case WIRE_GOSSIPD_RECV_GOSSIP: |
| 297 | handle_recv_gossip(daemon, msg); |
| 298 | goto handled; |
| 299 | |
| 300 | case WIRE_GOSSIPD_NEW_PEER: |
| 301 | connectd_new_peer(daemon, msg); |
| 302 | goto handled; |
| 303 | |
| 304 | case WIRE_GOSSIPD_PEER_GONE: |
| 305 | connectd_peer_gone(daemon, msg); |
| 306 | goto handled; |
| 307 | |
| 308 | /* We send these, don't receive them. */ |
| 309 | case WIRE_GOSSIPD_SEND_GOSSIP: |
| 310 | break; |
| 311 | } |
| 312 | |
| 313 | status_failed(STATUS_FAIL_INTERNAL_ERROR, |
| 314 | "Bad msg from connectd2: %s", tal_hex(tmpctx, msg)); |
| 315 | |
| 316 | handled: |
| 317 | return daemon_conn_read_next(conn, daemon->connectd); |
| 318 | } |
| 319 | |
| 320 | void tell_lightningd_peer_update(struct daemon *daemon, |
| 321 | const struct node_id *source_peer, |
nothing calls this directly
no test coverage detected