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

Function peer_init_hdr_received

connectd/peer_exchange_initmsg.c:143–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143static struct io_plan *peer_init_hdr_received(struct io_conn *conn,
144 struct early_peer *peer)
145{
146 u16 len;
147
148 if (!cryptomsg_decrypt_header(&peer->cs, peer->msg, &len))
149 return io_close(conn);
150
151 tal_free(peer->msg);
152 peer->msg = tal_arr(peer, u8, (u32)len + CRYPTOMSG_BODY_OVERHEAD);
153 return io_read(conn, peer->msg, tal_count(peer->msg),
154 peer_init_received, peer);
155}
156
157static struct io_plan *read_init(struct io_conn *conn, struct early_peer *peer)
158{

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