diff options
| author | Pieter Wuille <[email protected]> | 2015-03-05 04:01:22 -0800 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2015-03-06 04:03:17 -0800 |
| commit | ba04c4a7801e7d68a5e84035b919e5c3626eb7a7 (patch) | |
| tree | f4719f30e05d9b918ce0175355d81d313526135f /src/net.h | |
| parent | QT: remove unused parameter (diff) | |
| download | discoin-ba04c4a7801e7d68a5e84035b919e5c3626eb7a7.tar.xz discoin-ba04c4a7801e7d68a5e84035b919e5c3626eb7a7.zip | |
Limit message sizes before transfer
This introduces a fixed limit for the size of p2p messages, and enforces it
before download.
Diffstat (limited to 'src/net.h')
| -rw-r--r-- | src/net.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -46,6 +46,8 @@ static const int TIMEOUT_INTERVAL = 20 * 60; static const unsigned int MAX_INV_SZ = 50000; /** 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 2 MiB is currently acceptable). */ +static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 2 * 1024 * 1024; /** -listen default */ static const bool DEFAULT_LISTEN = true; /** -upnp default */ |