Following #9494, where they were introduced to ease the transition.
The first commit removes the uses, the second commit removes the wrappers themselves.
utACK 39faab76321bc6bf217ffdc9b380c60b9d99416f
utACK 39faab76321bc6bf217ffdc9b380c60b9d99416f
Concept ACK. Needs rebase.
Tested ACK 39faab76321bc6bf217ffdc9b380c60b9d99416f
Rebased.
Wait, is this the direction we want to go in, or the opposite? eg i figured we'd want to slowly move towards storing references to gArgs in things that need them, eg as we move towards classes which contain things (CConnman, CChainState, etc) we'd either pass in the options relevant to those objects (ala CConnman's constructor) or pass them the gArgs to avoid the global.
@TheBlueMatt what you mention makes sense to me, but it seems unrelated to this PR, which is just about removing the wrappers (which use the same global). This PR is also good prep-work for storing references to gArgs in classes in that sense.
Hmm, I figured it'd be easier to just sed/gArgs/locallyReferencedArgs/ in files, but I guess it doesnt matter much either way.
One can easily do this after this PR, whereas before, gArgs didn't even appear in all the places you'd expect it to and you'd have to use the same kind of complex regexp to catch them all as in the scripted diff script. I agree it doesn't matter much, but it does make it easier I think.
It could be a long time too until someone starts doing this work, and in the meantime, we can avoid the confusion of how to use it, saving review cycles/time.
Needs rebase :-)
Rebased 😆
How can I retrigger CI?
Needs rebase.
They were temporary additions to ease the transition.
-BEGIN VERIFY SCRIPT-
find src/ -name "*.cpp" ! -wholename "src/util.h" ! -wholename "src/util.cpp" | xargs perl -i -pe 's/(?<!\.)(ParseParameters|ReadConfigFile|IsArgSet|(Soft|Force)?(Get|Set)(|Bool|)Arg(s)?)\(/gArgs.\1(/g'
-END VERIFY SCRIPT-
@TheBlueMatt thx. Rebased.
I believe 3b22edd has an unrelated change that should be in bb3d105, otherwise tested ACK 3b22edd.
@benma is right. Commits should be atomic (https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#contributor-workflow)
Slightly tested ACK 3b22edd106f51cc25b200e41ffaab10877c50144. Confirmed both commits compile, so I think the atomic commit issue is resolved.
utACK 3b22edd106f51cc25b200e41ffaab10877c50144
ACK 3b22edd.
Let's try to merge this right before branching off.
utACK 3b22edd106f51cc25b200e41ffaab10877c50144, but it conflicts with #10882, which is tagged for 0.15.
Needs rebase.
Rebased and merged via c2704ec
Oh, nice, I was planning to do this but thank you for doing it faster!