p2p: disambiguate block-relay-only variable names from blocksonly variables #19217

pull glowang wants to merge 1 commits into bitcoin:master from glowang:2020/06/08/rename-max-block-relay-connection-name changing 2 files +2 −2
  1. glowang commented at 5:10 am on June 9, 2020: contributor

    We have two different concepts that have similar names: -blocksonly and block-relay-only, and the similarity of names could lead to confusion. -blocksonly disables all local receiving & relaying of transactions (with a few exceptions), while block-relay-onlymeans that bitcoind will make 2 additional outbound connections that are only used for block relay.

    In net.h and init.cpp, MAX_BLOCKS_ONLY_CONNECTIONS is used to represent the maximum number of block-relay-only outbound peers, which is 2. But this name sounds ambiguous, and I proposed a better name, MAX_BLOCK_RELAY_ONLY_CONNECTION.

  2. fanquake added the label P2P on Jun 9, 2020
  3. fanquake added the label Refactoring on Jun 9, 2020
  4. DrahtBot commented at 10:22 am on June 9, 2020: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #17428 (p2p: Try to preserve outbound block-relay-only connections during restart by hebasto)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. glowang marked this as ready for review on Jun 9, 2020
  6. scripted-diff: replace MAX_BLOCKS_ONLY_CONNECTIONS with MAX_BLOCK_RELAY_ONLY_CONNECTIONS
    -BEGIN VERIFY SCRIPT-
    sed -i 's/\<MAX_BLOCKS_ONLY_CONNECTIONS\>/MAX_BLOCK_RELAY_ONLY_CONNECTIONS/g' src/init.cpp
    sed -i 's/\<MAX_BLOCKS_ONLY_CONNECTIONS\>/MAX_BLOCK_RELAY_ONLY_CONNECTIONS/g' src/net.h
    -END VERIFY SCRIPT-
    ec4c6a17e8
  7. glowang force-pushed on Jun 9, 2020
  8. glowang renamed this:
    disambiguate block-relay-only variable names from blocksonly variables
    p2p: disambiguate block-relay-only variable names from blocksonly variables
    on Jun 9, 2020
  9. fanquake requested review from amitiuttarwar on Jul 21, 2020
  10. fanquake requested review from jnewbery on Jul 21, 2020
  11. jnewbery commented at 12:55 pm on July 21, 2020: member

    ACK ec4c6a17e82a6726d95075b43ebd2525c50b37cd

    Thanks for this!

  12. MarcoFalke merged this on Jul 21, 2020
  13. MarcoFalke closed this on Jul 21, 2020

  14. sidhujag referenced this in commit caed5d864d on Jul 21, 2020
  15. Fabcien referenced this in commit 45414ac4c1 on Sep 2, 2021
  16. DrahtBot locked this on Feb 15, 2022

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: 2024-11-17 15:12 UTC

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