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
This commit is contained in:
W. J. van der Laan 2021-09-30 12:32:56 +02:00 committed by pasta
parent 5fbdfa1163
commit 8d3eceacc0
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -1268,6 +1268,8 @@ bool AppInitParameterInteraction(const ArgsManager& args)
#else #else
int fd_max = FD_SETSIZE; int fd_max = FD_SETSIZE;
#endif #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); 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) if (nFD < MIN_CORE_FILEDESCRIPTORS)
return InitError(_("Not enough file descriptors available.")); return InitError(_("Not enough file descriptors available."));