diff --git a/src/net.h b/src/net.h index 6cae35e8e0..7801bedf46 100644 --- a/src/net.h +++ b/src/net.h @@ -52,7 +52,7 @@ static const unsigned int MAX_LOCATOR_SZ = 101; /** The maximum number of new addresses to accumulate before announcing. */ static const unsigned int MAX_ADDR_TO_SEND = 1000; /** Maximum length of incoming protocol messages (no message over 4 MB is currently acceptable). */ -static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 4 * 1000 * 1000; +static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 16 * 1000 * 1000; /** Maximum length of strSubVer in `version` message */ static const unsigned int MAX_SUBVERSION_LENGTH = 256; /** Maximum number of automatic outgoing nodes */ diff --git a/test/bitcoin_functional/functional/p2p_invalid_messages.py b/test/bitcoin_functional/functional/p2p_invalid_messages.py index 700fdf6e04..d30900eba3 100755 --- a/test/bitcoin_functional/functional/p2p_invalid_messages.py +++ b/test/bitcoin_functional/functional/p2p_invalid_messages.py @@ -52,7 +52,7 @@ class InvalidMessagesTest(BitcoinTestFramework): node.add_p2p_connection(P2PDataStore()) conn2 = node.add_p2p_connection(P2PDataStore()) - msg_limit = 4 * 1000 * 1000 # 4MB, per MAX_PROTOCOL_MESSAGE_LENGTH + msg_limit = 16 * 1000 * 1000 # 16MB, per MAX_PROTOCOL_MESSAGE_LENGTH valid_data_limit = msg_limit - 5 # Account for the 4-byte length prefix # diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py index 700fdf6e04..d30900eba3 100755 --- a/test/functional/p2p_invalid_messages.py +++ b/test/functional/p2p_invalid_messages.py @@ -52,7 +52,7 @@ class InvalidMessagesTest(BitcoinTestFramework): node.add_p2p_connection(P2PDataStore()) conn2 = node.add_p2p_connection(P2PDataStore()) - msg_limit = 4 * 1000 * 1000 # 4MB, per MAX_PROTOCOL_MESSAGE_LENGTH + msg_limit = 16 * 1000 * 1000 # 16MB, per MAX_PROTOCOL_MESSAGE_LENGTH valid_data_limit = msg_limit - 5 # Account for the 4-byte length prefix #