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

Function read_body_from_peer

connectd/multiplex.c:1616–1629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1614}
1615
1616static struct io_plan *read_body_from_peer(struct io_conn *peer_conn,
1617 struct peer *peer)
1618{
1619 u16 len;
1620
1621 if (!cryptomsg_decrypt_header(&peer->cs, peer->peer_in, &len))
1622 return io_close(peer_conn);
1623
1624 peer->gs.bytes_rcvd_this_second += tal_bytelen(peer->peer_in);
1625
1626 tal_resize(&peer->peer_in, (u32)len + CRYPTOMSG_BODY_OVERHEAD);
1627 return io_read(peer_conn, peer->peer_in, tal_count(peer->peer_in),
1628 read_body_from_peer_done, peer);
1629}
1630
1631static void recv_throttle_timeout(struct peer *peer)
1632{

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