rpc: Add and use EnsureArgsman helper #23936

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:2201-rpcArgs changing 4 files +25 −9
  1. MarcoFalke commented at 9:45 am on January 2, 2022: member
    This refactor doesn’t change anything for the rpc layer, but it helps a bit with removing gArgs (See #21005)
  2. rpc: Add EnsureArgsman helper fa98b6f644
  3. rpc: Use EnsureAnyArgsman in rpc/blockchain fa5bb37611
  4. MarcoFalke added the label Refactoring on Jan 2, 2022
  5. shaavan approved
  6. shaavan commented at 12:46 pm on January 2, 2022: contributor

    Code Review ACK fa5bb37611dea5d3e6715b0c84249e39ad1d2476

    • The newly added helper functions: EnsureArgsman and EnsureAnyArgsman together allow getting node arguments from a given (any) context. These simplify the code wherever we need arguments based on a request context.

    • Checked that the function EnsureAnyArgsman is used correctly in rpc/blockchain.cpp

    • Checked that out of the remaining instances of NodeContext& node none can be replaced with args{EnsureAnyArgsman(request.context)} in this PR.

    • Finally, I am concept ACK on #21005, so I think it’s a step forward, replacing gArgs with args in the codebase.

  7. DrahtBot commented at 6:00 pm on January 2, 2022: 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:

    • #23497 (Add src/node/ and src/wallet/ code to node:: and wallet:: namespaces 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.

  8. MarcoFalke merged this on Jan 4, 2022
  9. MarcoFalke closed this on Jan 4, 2022

  10. MarcoFalke deleted the branch on Jan 4, 2022
  11. sidhujag referenced this in commit d87288f5ad on Jan 4, 2022
  12. DrahtBot locked this on Jan 4, 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: 2024-11-17 21:12 UTC

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