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

Function read_body_from_peer

connectd/multiplex.c:1157–1168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1155}
1156
1157static struct io_plan *read_body_from_peer(struct io_conn *peer_conn,
1158 struct peer *peer)
1159{
1160 u16 len;
1161
1162 if (!cryptomsg_decrypt_header(&peer->cs, peer->peer_in, &len))
1163 return io_close(peer_conn);
1164
1165 tal_resize(&peer->peer_in, (u32)len + CRYPTOMSG_BODY_OVERHEAD);
1166 return io_read(peer_conn, peer->peer_in, tal_count(peer->peer_in),
1167 read_body_from_peer_done, peer);
1168}
1169
1170static struct io_plan *read_hdr_from_peer(struct io_conn *peer_conn,
1171 struct peer *peer)

Callers

nothing calls this directly

Calls 2

cryptomsg_decrypt_headerFunction · 0.85
io_closeFunction · 0.85

Tested by

no test coverage detected