Skip to content

Conversation

@ekzyis
Copy link

@ekzyis ekzyis commented Mar 9, 2023

This is a refactoring change. So I have read the following and will try to answer why this change should be accepted

  • Refactoring changes are only accepted if they are required for a feature or
    bug fix or otherwise improve developer experience significantly. For example,
    most "code style" refactoring changes require a thorough explanation why they
    are useful, what downsides they have and why they significantly improve
    developer experience or avoid serious programming bugs. Note that code style
    is often a subjective matter. Unless they are explicitly mentioned to be
    preferred in the developer notes, stylistic code
    changes are usually rejected.

I have noticed in #26899 (comment) that the helper message for -listen does not use string interpolation.

That confused me and I wasn't sure what the reasons for that are. So it could be argued this confusion (by possibly many people in the past and in the future) may already be enough to accept this change.

However, not accepting this means that if DEFAULT_LISTEN is ever changed, this helper message will still use the old value (however unlikely that may be).

Therefore, this PR makes the helper message consistent with how other helper messages are implemented (using string interpolation) which leads to less confusion and prevents possibly wrong documentation in the future.

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 9, 2023

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

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK vasild, stratospher, kristapsk

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #26899 (p2p: set -dnsseed and -listen false if maxconnections=0 by brunoerg)

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.

Copy link
Contributor

@vasild vasild left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 5c938e7

@stratospher
Copy link
Contributor

ACK 5c938e7.

Copy link
Contributor

@kristapsk kristapsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cr utACK 5c938e7

@fanquake fanquake merged commit 99b64ee into bitcoin:master Mar 10, 2023
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 10, 2023
…isten

5c938e7 Use string interpolation for default value of -listen (ekzyis)

Pull request description:

  This is a refactoring change. So I have read the following and will try to answer why this change should be accepted

  > * Refactoring changes are only accepted if they are required for a feature or
    bug fix or **_otherwise improve developer experience significantly_**. For example,
    most "code style" refactoring changes require a thorough explanation why they
    are useful, what downsides they have and why they *significantly* improve
    developer experience or avoid serious programming bugs. Note that code style
    is often a subjective matter. Unless they are explicitly mentioned to be
    preferred in the [developer notes](/doc/developer-notes.md), stylistic code
    changes are usually rejected.

  I have noticed in bitcoin#26899 (comment) that the helper message for `-listen` does not use string interpolation.

  That confused me and I wasn't sure what the reasons for that are. So it could be argued this confusion (by possibly many people in the past and in the future) may already be enough to accept this change.

  However, not accepting this means that if `DEFAULT_LISTEN` is ever changed, this helper message will still use the old value (however unlikely that may be).

  Therefore, this PR makes the helper message consistent with how other helper messages are implemented (using string interpolation) which leads to less confusion and prevents possibly wrong documentation in the future.

ACKs for top commit:
  stratospher:
    ACK 5c938e7.
  vasild:
    ACK 5c938e7
  kristapsk:
    cr utACK 5c938e7

Tree-SHA512: 8905f548ff399967966e67b29962821c28fd2620ff788c2b2bdfd088bbca75457dc63e933ad1985f93580508a65b91930fe4b2d97a2e0a7d83a3748b9ea2c26f
@bitcoin bitcoin locked and limited conversation to collaborators Mar 9, 2024
@ekzyis ekzyis deleted the use-string-interpolation-for-default-value-of-listen branch November 13, 2024 04:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants