aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorW. J. van der Laan <laanwj@protonmail.com>2021-09-30 12:32:56 +0200
committerW. J. van der Laan <laanwj@protonmail.com>2021-09-30 12:33:55 +0200
commitdbbb7fbcc02ef7a667878d2e6cfad4dc985700b8 (patch)
treebdbbac456ab10ab558791dbd2a9369376c2972e7 /src
parent80b4e8fb87a24c20ad9decaf55f73e22e54b8b34 (diff)
parent8ff3743f5e99c693710bc446bfd595687156ca6b (diff)
downloadbitcoin-dbbb7fbcc02ef7a667878d2e6cfad4dc985700b8.tar.xz
Merge bitcoin/bitcoin#23130: doc: Revert "Remove outdated comments" and place comment correctly
8ff3743f5e99c693710bc446bfd595687156ca6b Revert "doc: Remove outdated comments" (Hennadii Stepanov) Pull request description: Unfortunately, in #23094 the assumption that #14336 makes comments outdated is wrong. As pointed in https://github.com/bitcoin/bitcoin/pull/23094#discussion_r717226839, the #14336 just moved the relevant code a few lines down. This PR reverts commit ee7891a0c412728cf8bec667f25263682a9baaaf, and moves the comments into the right place. I apologize about that. ACKs for top commit: MarcoFalke: cr ACK 8ff3743f5e99c693710bc446bfd595687156ca6b laanwj: ACK 8ff3743f5e99c693710bc446bfd595687156ca6b Tree-SHA512: 84aca627bb5b49c06fc172778f9b9407482c5a873ccbc3dc40167e6a8ad0bc60475d6a469c843b7b42712e35cf3fc2d3518923e791d5e0c59628e042acc72747
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."));