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: member

    <!--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. MarcoFalke commented at 2:25 PM on March 12, 2020: member

    Going to reopen later

  6. MarcoFalke closed this on Mar 12, 2020

  7. MarcoFalke deleted the branch on Mar 12, 2020
  8. MarcoFalke restored the branch on Apr 10, 2020
  9. node: Add params to node context 1a50f348fa
  10. fuzz: Use node context params instead of Params() 775f893dd7
  11. MarcoFalke commented at 10:28 PM on April 10, 2020: member

    rebased

  12. MarcoFalke reopened this on Apr 10, 2020

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

    Going to reopen later

  15. MarcoFalke closed this on Apr 10, 2020

  16. DrahtBot locked this on Feb 15, 2022
  17. 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-04-17 06:14 UTC

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