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

Function read_init

connectd/peer_exchange_initmsg.c:157–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157static struct io_plan *read_init(struct io_conn *conn, struct early_peer *peer)
158{
159 /* Free our sent init msg. */
160 tal_free(peer->msg);
161
162 /* BOLT #1:
163 *
164 * The receiving node:
165 * - MUST wait to receive `init` before sending any other messages.
166 */
167 peer->msg = tal_arr(peer, u8, CRYPTOMSG_HDR_SIZE);
168 return io_read(conn, peer->msg, tal_bytelen(peer->msg),
169 peer_init_hdr_received, peer);
170}
171
172#if DEVELOPER
173static struct io_plan *peer_write_postclose(struct io_conn *conn,

Callers 3

peer_init_receivedFunction · 0.85
peer_write_postcloseFunction · 0.85
peer_write_post_sabotageFunction · 0.85

Calls 2

tal_freeFunction · 0.85
tal_bytelenFunction · 0.85

Tested by

no test coverage detected