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

Function read_body_from_peer

connectd/multiplex.c:1661–1674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1659}
1660
1661static struct io_plan *read_body_from_peer(struct io_conn *peer_conn,
1662 struct peer *peer)
1663{
1664 u16 len;
1665
1666 if (!cryptomsg_decrypt_header(&peer->cs, peer->peer_in, &len))
1667 return io_close(peer_conn);
1668
1669 peer->gs.bytes_rcvd_this_second += tal_bytelen(peer->peer_in);
1670
1671 tal_resize(&peer->peer_in, (u32)len + CRYPTOMSG_BODY_OVERHEAD);
1672 return io_read(peer_conn, peer->peer_in, tal_count(peer->peer_in),
1673 read_body_from_peer_done, peer);
1674}
1675
1676static void recv_throttle_timeout(struct peer *peer)
1677{

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