aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorGleb Naumenko <naumenko.gs@gmail.com>2020-07-08 10:29:47 +0300
committerGleb Naumenko <naumenko.gs@gmail.com>2020-07-24 18:02:20 +0300
commit7cc0e8101f01891aa8be093a00d993bb7579c385 (patch)
tree7d07db047d4c19a4d50a2f087e9e4da7eef7ee3a /src/net.h
parentded742bc5b96e3215d69c11fb3628d224e7ae034 (diff)
downloadbitcoin-7cc0e8101f01891aa8be093a00d993bb7579c385.tar.xz
Remove useless 2500 limit on AddrMan queries
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 17d8fda372..3492a784cc 100644
--- a/src/net.h
+++ b/src/net.h
@@ -52,6 +52,9 @@ static const int TIMEOUT_INTERVAL = 20 * 60;
static const int FEELER_INTERVAL = 120;
/** The maximum number of new addresses to accumulate before announcing. */
static const unsigned int MAX_ADDR_TO_SEND = 1000;
+// TODO: remove ADDRMAN_GETADDR_MAX and let the caller specify this limit with MAX_ADDR_TO_SEND.
+static_assert(MAX_ADDR_TO_SEND == ADDRMAN_GETADDR_MAX,
+ "Max allowed ADDR message size should be equal to the max number of records returned from AddrMan.");
/** 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;
/** Maximum length of the user agent string in `version` message */