Skip to content

Commit d423fd9

Browse files
jonatackMarcoFalkeryanofsky
committed
cli, bugfix: for -getinfo, replace IsArgSet() with GetBoolArg()
for consistency with the other CLI commands (-netinfo, -addrinfo, -generate). This can be considered a bugfix because IsArgSet() returns whether an arg has been set even if it has been negated. After this change, we no longer treat -nogetinfo and -getinfo=0 the same as -getinfo and -getinfo=1, and instead as if -getinfo was not specified. Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^[email protected]> Co-authored-by: Ryan Ofsky <[email protected]>
1 parent e99e41b commit d423fd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bitcoin-cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ static int CommandLineRPC(int argc, char *argv[])
12481248
gArgs.CheckMultipleCLIArgs();
12491249
std::unique_ptr<BaseRequestHandler> rh;
12501250
std::string method;
1251-
if (gArgs.IsArgSet("-getinfo")) {
1251+
if (gArgs.GetBoolArg("-getinfo", false)) {
12521252
rh.reset(new GetinfoRequestHandler());
12531253
} else if (gArgs.GetBoolArg("-netinfo", false)) {
12541254
if (!args.empty() && (args.at(0) == "h" || args.at(0) == "help")) {

0 commit comments

Comments
 (0)