refactor: Add params to node context #18322

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:2003-nodeParams changing 12 files +39 −16
  1. MarcoFalke commented at 9:52 PM on March 11, 2020: member

    EnsureParams(node) and Params() are completely identical, but slowly removing the global Params() makes the code easier to reason about and easier to test. Some places do not rely on the global, but pass around the params through deep call stacks. If the params are passed along with a node context, those could be removed, as just passing a node context should be sufficient.

    I suggest that existing code stays as is, but whenever code is touched for other reasons, it could be updated to use EnsureParams().

  2. MarcoFalke added the label Refactoring on Mar 11, 2020
  3. practicalswift commented at 1:00 AM on March 12, 2020: contributor

    Concept ACK: less is more when it comes to globals

  4. DrahtBot commented at 1:11 AM on March 12, 2020: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #18267 (BIP-325: Signet [consensus] by kallewoof)
    • #17997 (refactor: Remove mempool global from net by MarcoFalke)
    • #17786 (refactor: Nuke policy/fees->mempool circular dependencies by hebasto)
    • #17434 (Move parsing from init.cpp to where values are needed by Xekyo)
    • #17037 (Testschains: Many regtests with different genesis and default datadir by jtimon)
    • #10443 (Add fee_est tool for debugging fee estimation code by ryanofsky)

    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. DrahtBot cross-referenced this on Mar 12, 2020 from issue refactor: Nuke policy/fees->mempool circular dependencies by hebasto
  6. DrahtBot cross-referenced this on Mar 12, 2020 from issue Move parsing from init.cpp to where values are needed by murchandamus
  7. DrahtBot cross-referenced this on Mar 12, 2020 from issue Testschains: Many regtests with different genesis and default datadir by jtimon
  8. DrahtBot cross-referenced this on Mar 12, 2020 from issue Add fee_est tool for debugging fee estimation code by ryanofsky
  9. DrahtBot cross-referenced this on Mar 12, 2020 from issue BIP-325: Signet [consensus] by kallewoof
  10. MarcoFalke commented at 2:25 PM on March 12, 2020: member

    Going to reopen later

  11. MarcoFalke closed this on Mar 12, 2020

  12. MarcoFalke deleted the branch on Mar 12, 2020
  13. DrahtBot cross-referenced this on Mar 12, 2020 from issue refactor: Remove mempool global from net by MarcoFalke
  14. MarcoFalke restored the branch on Apr 10, 2020
  15. node: Add params to node context 1a50f348fa
  16. fuzz: Use node context params instead of Params() 775f893dd7
  17. MarcoFalke commented at 10:28 PM on April 10, 2020: member

    rebased

  18. MarcoFalke reopened this on Apr 10, 2020

  19. MarcoFalke force-pushed on Apr 10, 2020
  20. MarcoFalke commented at 10:31 PM on April 10, 2020: member

    Going to reopen later

  21. MarcoFalke closed this on Apr 10, 2020

  22. bitcoin locked this on Feb 15, 2022
  23. MarcoFalke deleted the branch on Feb 27, 2023

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:54 UTC