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
  1. ghost commented at 5:46 PM on August 1, 2015: none

    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.

  2. 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
  3. 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
  4. jonasschnelli commented at 9:53 PM on August 1, 2015: contributor

    utACK.

  5. 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?

  6. sipa commented at 11:24 PM on August 1, 2015: member

    @NanoAkron This is just a network implementation constant, definitely not something consensus critical.

  7. laanwj commented at 11:09 AM on August 3, 2015: member

    Looks good to me. utACK

  8. laanwj added the label Refactoring on Aug 3, 2015
  9. 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

  10. laanwj commented at 12:05 PM on August 3, 2015: member

    Similar to #6349 (but affects a different value)

  11. fanquake commented at 5:02 PM on August 3, 2015: member

    utACK

  12. Consolidate individual references to the current maximum peer connection
    value of 125 into a single constant declaration.
    19dd40a25f
  13. sipa commented at 5:36 PM on August 4, 2015: member

    utACK

  14. sipa merged this on Aug 4, 2015
  15. sipa closed this on Aug 4, 2015

  16. sipa referenced this in commit 586a29253d on Aug 4, 2015
  17. zkbot referenced this in commit 45faa928ec on Mar 26, 2017
  18. MarcoFalke 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-04-17 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me