Skip to content

Commit 676af73

Browse files
committed
f - Increase MAX_HTTP_MESSAGE_BODY_SIZE to account for encoding
1 parent eae0257 commit 676af73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning-block-sync/src/http.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ use std::net::TcpStream;
2121
/// Maximum HTTP message header size in bytes.
2222
const MAX_HTTP_MESSAGE_HEADER_SIZE: usize = 8192;
2323

24-
/// Maximum HTTP message body size in bytes.
25-
const MAX_HTTP_MESSAGE_BODY_SIZE: usize = 4_000_000;
24+
/// Maximum HTTP message body size in bytes. Enough for a hex-encoded block in JSON format.
25+
const MAX_HTTP_MESSAGE_BODY_SIZE: usize = 2 * 4_000_000 + 64;
2626

2727
/// Endpoint for interacting with an HTTP-based API.
2828
#[derive(Debug)]

0 commit comments

Comments
 (0)