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

Function handshake_in_success

connectd/connectd.c:368–380  ·  view source on GitHub ↗

~ handshake.c's handles setting up the crypto state once we get a connection * in; we hand it straight to peer_exchange_initmsg() to send and receive INIT * and call peer_connected(). */

Source from the content-addressed store, hash-verified

366 * in; we hand it straight to peer_exchange_initmsg() to send and receive INIT
367 * and call peer_connected(). */
368static struct io_plan *handshake_in_success(struct io_conn *conn,
369 const struct pubkey *id_key,
370 const struct wireaddr_internal *addr,
371 struct crypto_state *cs,
372 struct oneshot *timeout,
373 struct daemon *daemon)
374{
375 struct node_id id;
376 node_id_from_pubkey(&id, id_key);
377 status_peer_debug(&id, "Connect IN");
378 return peer_exchange_initmsg(conn, daemon, daemon->our_features,
379 cs, &id, addr, timeout, true);
380}
381
382/*~ If the timer goes off, we simply free everything, which hangs up. */
383static void conn_timeout(struct io_conn *conn)

Callers

nothing calls this directly

Calls 2

node_id_from_pubkeyFunction · 0.85
peer_exchange_initmsgFunction · 0.85

Tested by

no test coverage detected