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

Function peer_init_hdr_received

connectd/peer_exchange_initmsg.c:162–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162static struct io_plan *peer_init_hdr_received(struct io_conn *conn,
163 struct early_peer *peer)
164{
165 u16 len;
166
167 if (!cryptomsg_decrypt_header(&peer->cs, peer->msg, &len))
168 return io_close(conn);
169
170 tal_free(peer->msg);
171 peer->msg = tal_arr(peer, u8, (u32)len + CRYPTOMSG_BODY_OVERHEAD);
172 return io_read(conn, peer->msg, tal_count(peer->msg),
173 peer_init_received, peer);
174}
175
176static struct io_plan *read_init(struct io_conn *conn, struct early_peer *peer)
177{

Callers

nothing calls this directly

Calls 3

cryptomsg_decrypt_headerFunction · 0.85
io_closeFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected