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-
MarcoFalke commented at 9:45 am on January 2, 2022: memberThis refactor doesn’t change anything for the rpc layer, but it helps a bit with removing gArgs (See #21005)
-
rpc: Add EnsureArgsman helper fa98b6f644
-
rpc: Use EnsureAnyArgsman in rpc/blockchain fa5bb37611
-
MarcoFalke added the label Refactoring on Jan 2, 2022
-
shaavan approved
-
shaavan commented at 12:46 pm on January 2, 2022: contributor
Code Review ACK fa5bb37611dea5d3e6715b0c84249e39ad1d2476
-
The newly added helper functions:
EnsureArgsman
andEnsureAnyArgsman
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 withargs{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.
-
-
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/
andsrc/wallet/
code tonode::
andwallet::
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.
- #23497 (Add
-
MarcoFalke merged this on Jan 4, 2022
-
MarcoFalke closed this on Jan 4, 2022
-
MarcoFalke deleted the branch on Jan 4, 2022
-
sidhujag referenced this in commit d87288f5ad on Jan 4, 2022
-
DrahtBot locked this on Jan 4, 2023
Labels
Refactoring
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-12-19 09:12 UTC
More mirrored repositories can be found on mirror.b10c.me