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

Function read_body_from_peer

connectd/multiplex.c:1541–1554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1539}
1540
1541static struct io_plan *read_body_from_peer(struct io_conn *peer_conn,
1542 struct peer *peer)
1543{
1544 u16 len;
1545
1546 if (!cryptomsg_decrypt_header(&peer->cs, peer->peer_in, &len))
1547 return io_close(peer_conn);
1548
1549 peer->bytes_rcvd_this_second += tal_bytelen(peer->peer_in);
1550
1551 tal_resize(&peer->peer_in, (u32)len + CRYPTOMSG_BODY_OVERHEAD);
1552 return io_read(peer_conn, peer->peer_in, tal_count(peer->peer_in),
1553 read_body_from_peer_done, peer);
1554}
1555
1556static void recv_throttle_timeout(struct peer *peer)
1557{

Callers

nothing calls this directly

Calls 3

cryptomsg_decrypt_headerFunction · 0.85
io_closeFunction · 0.85
tal_bytelenFunction · 0.85

Tested by

no test coverage detected