diff --git a/src/net.h b/src/net.h --- a/src/net.h +++ b/src/net.h @@ -52,6 +52,10 @@ static const int FEELER_INTERVAL = 120; /** The maximum number of entries in an 'inv' protocol message */ static const unsigned int MAX_INV_SZ = 50000; +static_assert(MAX_PROTOCOL_MESSAGE_LENGTH > MAX_INV_SZ * sizeof(CInv), + "Max protocol message length must be greater than largest " + "possible INV message"); + /** The maximum number of new addresses to accumulate before announcing. */ static const unsigned int MAX_ADDR_TO_SEND = 1000; /** Maximum length of strSubVer in `version` message */