-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Util: Remove redundant calls to argsGlobal.IsArgSet() #10118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Needed rebase. |
a3ddf70 to
1bcd337
Compare
|
Needed rebase after #9494 was merged. The indentation is improved for the first commit but the second commit making the indentation complete was not rebased and was removed instead. If it is wanted I am happy to re-write it. |
TheBlueMatt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note you can also remove the IsArgSet("-addnode") at the top of ThreadOpenAddedConnections.
Also, would highly prefer you not leave indentation broken everywhere - its easy enough to review with whitespace diff ignored.
src/httprpc.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We generally prefer to remove BOOST while changing lines, no (also, I believe could constify the strRPCAuth, while you're at it)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was leaving it for #10193, but happy to do it here in the touched lines.
Specially since I'm not able to fix my problem with the reverse loop there :(
|
Fixed nits, squash pending. |
1ab4c69 to
78a997e
Compare
|
Needed rebase, squashed fixes to @TheBlueMatt 's nits. |
|
Needed rebase after #10502 was merged. Extra motivation for review: "C'mon, +16 -37, must be good". |
ryanofsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK b527f8d3b10ee2232a921faf934e690af0e14640
src/util.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could return {};
|
Fixed @ryanofsky 's nit. |
ryanofsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK a0c00786d488a1022867e7461ff071dd78d2361e. Same as previous, just has the suggested change.
|
utACK a0c00786d488a1022867e7461ff071dd78d2361e |
|
Concept ACK |
|
If it helps I can do the proper indentation in a commit afterwards, I had it previously but I ditched on rebase out of laziness at some point. Trivial to put it back. |
|
I'd prefer fixing up the identation in this same PR, a commit afterwards is fine, but I'd prefer we avoid a "fix up the identation after #10118" PR. |
Return empty std::vector<std::string> with ArgsManager::GetArgs if nothing is set for that string
|
Needed rebase, added commit for indentation. |
…Set() ed866ab Indentation after 'Remove redundant calls to gArgs.IsArgSet()' (Jorge Timón) 506b700 Util: Remove redundant calls to gArgs.IsArgSet() (Jorge Timón) Tree-SHA512: 4f97a0bf2a76c0f351a6343db62898cf057d745c848de00fa09465e870a120f28e0d836cafd6a047f4ec0da7ab671aebee43fa7410c9f0e66382edd1bb2009ba
4709ff8 remove now unused gArgs wrappers (Fuzzbawls) cc40f8d Manual prep for gArg wrapper removal (Fuzzbawls) b3c843c scripted-diff: stop using the gArgs wrappers (Fuzzbawls) 5ce3844 Migrate g_logger fields to gArgs (Fuzzbawls) 72a6f56 Track negated arguments in the argument paser. (Fuzzbawls) 3142e1b Add additional tests for GetBoolArg() (Fuzzbawls) 4aef2f3 Fix constness of ArgsManager methods (Fuzzbawls) 13fd27d Fix indentation after 'Remove redundant calls to gArgs.IsArgSet()' (Fuzzbawls) a4114f3 Util: Remove redundant calls to gArgs.IsArgSet() (Fuzzbawls) 92e7227 Util: Small improvements in gArgs usage (Fuzzbawls) a8b26e7 Util: Put mapMultiArgs inside ArgsManager (Fuzzbawls) d2f2e25 scripted-diff: Util: Encapsulate mapMultiArgs behind gArgs (Fuzzbawls) b2abc59 Util: Create ArgsManager class... (Fuzzbawls) 8c4d9c5 Add a ForceSetArg method for testing (Fuzzbawls) 59d6529 Lock mapArgs/mapMultiArgs access in util (Fuzzbawls) f7f2689 Un-expose mapArgs from util.h (Fuzzbawls) 7894b07 Get rid of mapArgs direct access in ZMQ construction (Matt Corallo) b28789f Introduce (and use) an IsArgSet accessor method (Fuzzbawls) 4d8ecf9 Fix non-const mapMultiArgs[] access after init. (Fuzzbawls) 391388d Remove arguments to ReadConfigFile (Fuzzbawls) Pull request description: This is a cumulation of several upstream backports surrounding the argument parsing code. Included here are the following upstream PRs: - bitcoin#9243 - bitcoin#9494 - bitcoin#10118 - bitcoin#10901 - bitcoin#12713 - bitcoin#10607 I've also refactored the global logging argument parsing to match, as that was an "out-of-order" PR that was previously backported to match our previous state. ACKs for top commit: random-zebra: utACK 4709ff8 furszy: cool encapsulation, utACK 4709ff8 and merging Tree-SHA512: 74c8dc1b2280b726eff44855e9908f3563d4ef6493f296ebfafe240ac6470bc45cbc75baac614ed59dfda9e1377b7da7d47a695dfc05e364cada2468bb99a258
Includes:
I'm happy squashing the indentation commit, leaving it separated or leaving it out of the PR.