Skip to content

Commit a6386c2

Browse files
sdaftuarsipa
authored andcommitted
Increase MAX_PROTOCOL_MESSAGE_LENGTH
Witness blocks can be greater than 2MiB, but cannot be validly greater than 4MB.
1 parent e573571 commit a6386c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/net.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ static const int TIMEOUT_INTERVAL = 20 * 60;
4444
static const unsigned int MAX_INV_SZ = 50000;
4545
/** The maximum number of new addresses to accumulate before announcing. */
4646
static const unsigned int MAX_ADDR_TO_SEND = 1000;
47-
/** Maximum length of incoming protocol messages (no message over 2 MiB is currently acceptable). */
48-
static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 2 * 1024 * 1024;
47+
/** Maximum length of incoming protocol messages (no message over 4 MB is currently acceptable). */
48+
static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 4 * 1000 * 1000;
4949
/** Maximum length of strSubVer in `version` message */
5050
static const unsigned int MAX_SUBVERSION_LENGTH = 256;
5151
/** -listen default */

0 commit comments

Comments
 (0)