Skip to content

Remove m_is_test_chain, use ChainType directly #28376

Closed

Description

@maflcko

Motivation

m_is_test_chain is a bool, which has the meaning m_chain_type!=MAIN. This is just bloats the code with test-only code, so it should be removed and be replaced by the equivalent meaning. See the output of git grep m_is_test_chain and the suggestion #28316 (comment)

Possible solution

Useful Skills

  • Compiling Bitcoin Core from source
  • Running the C++ unit tests and the Python functional tests

Guidance for new contributors

Want to work on this issue?

For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.

Activity

  1. changed the title [-]Remove m_is_test_chain[/-] [+]Remove m_is_test_chain, use ChainType directly[/+] on Aug 31, 2023
  2. BrandonOdiwuor commented on Aug 31, 2023

    @BrandonOdiwuor
    Contributor

    would like to work on this

  3. linked a pull request that will close this issueRefactor: Remove m_is_test_chain #28379on Aug 31, 2023
  4. luke-jr commented on Sep 5, 2023

    @luke-jr
    Contributor

    Concept NACK. Someday, albeit perhaps not the near future, Bitcoin may have multiple non-test blockchains. No reason to work in the opposite direction.

  5. maflcko commented on Sep 6, 2023

    @maflcko
    MemberAuthor

    If someone writes a patch to support multiple non-test blockchains, massive changes are needed, and a trivial one-line (or four-line) diff should be least of all problems.

    I still agree with the changes, but let's move the discussion to #28379. No need to have two threads going on for one thing.

  6. added a commit that references this issue on Sep 21, 2023
  7. locked and limited conversation to collaborators on Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions