Currently, there are several integer literals of value 125 used to represent the maximum number of peer connections to maintain. This commit replaces those literals with a single constant defined in net.h.
Consolidate scattered max peer connection values into single declaration. #6503
pull ghost wants to merge 1 commits into bitcoin:master from changing 3 files +5 −3-
ghost commented at 5:46 PM on August 1, 2015: none
- unknown renamed this:
Consolidate individual references to the current maximum peer connection
Consolidate disparate max peer connection values into single declaration.
on Aug 1, 2015 - unknown renamed this:
Consolidate disparate max peer connection values into single declaration.
Consolidate scattered max peer connection values into single declaration.
on Aug 1, 2015 -
jonasschnelli commented at 9:53 PM on August 1, 2015: contributor
utACK.
-
ghost commented at 11:21 PM on August 1, 2015: none
I forget by whom, but wasn't there a previous recent effort to consolidate all constants into a single consensus header?
-
sipa commented at 11:24 PM on August 1, 2015: member
@NanoAkron This is just a network implementation constant, definitely not something consensus critical.
-
laanwj commented at 11:09 AM on August 3, 2015: member
Looks good to me. utACK
- laanwj added the label Refactoring on Aug 3, 2015
-
in src/net.h:None in 8ee32bd438 outdated
55 | @@ -56,6 +56,8 @@ static const bool DEFAULT_UPNP = false; 56 | #endif 57 | /** The maximum number of entries in mapAskFor */ 58 | static const size_t MAPASKFOR_MAX_SZ = MAX_INV_SZ; 59 | +/** The maximum number of peer connections to maintain. */ 60 | +static const unsigned int MAX_PEER_CONNECTIONS = 125;
laanwj commented at 12:01 PM on August 3, 2015:A more consistent (and correct) name would be
DEFAULT_MAX_PEER_CONNECTIONS
Diapolo commented at 2:10 PM on August 3, 2015:Agreed
fanquake commented at 5:02 PM on August 3, 2015: memberutACK
19dd40a25fConsolidate individual references to the current maximum peer connection
value of 125 into a single constant declaration.
sipa commented at 5:36 PM on August 4, 2015: memberutACK
sipa merged this on Aug 4, 2015sipa closed this on Aug 4, 2015sipa referenced this in commit 586a29253d on Aug 4, 2015str4d cross-referenced this on Mar 14, 2017 from issue Tor ephemeral hidden services by str4dzkbot referenced this in commit 45faa928ec on Mar 26, 2017bitcoin locked this on Sep 8, 2021
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:55 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:55 UTC