aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-09-29 11:26:12 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-09-29 11:35:06 +0300
commit8ff3743f5e99c693710bc446bfd595687156ca6b (patch)
tree833d7312f457760f9455e6c7648bd7f06ce03716 /src
parent33e31f8df920acd3a4b13aab5bd6a6733480133a (diff)
downloadbitcoin-8ff3743f5e99c693710bc446bfd595687156ca6b.tar.xz
Revert "doc: Remove outdated comments"
This reverts commit ee7891a0c412728cf8bec667f25263682a9baaaf, and moves the comments into the right place.
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 25b9c6b9ec..df0c753b04 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -878,6 +878,8 @@ bool AppInitParameterInteraction(const ArgsManager& args)
#else
int fd_max = FD_SETSIZE;
#endif
+ // Trim requested connection counts, to fit into system limitations
+ // <int> in std::min<int>(...) to work around FreeBSD compilation issue described in #2695
nMaxConnections = std::max(std::min<int>(nMaxConnections, fd_max - nBind - MIN_CORE_FILEDESCRIPTORS - MAX_ADDNODE_CONNECTIONS - NUM_FDS_MESSAGE_CAPTURE), 0);
if (nFD < MIN_CORE_FILEDESCRIPTORS)
return InitError(_("Not enough file descriptors available."));