mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-13 11:35:20 +01:00
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 <*~=`'#}+{/-|&$^_@721217.xyz> Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
This commit is contained in:
parent
e99e41b307
commit
d423fd9ec8
1 changed files with 1 additions and 1 deletions
|
@ -1248,7 +1248,7 @@ static int CommandLineRPC(int argc, char *argv[])
|
|||
gArgs.CheckMultipleCLIArgs();
|
||||
std::unique_ptr<BaseRequestHandler> rh;
|
||||
std::string method;
|
||||
if (gArgs.IsArgSet("-getinfo")) {
|
||||
if (gArgs.GetBoolArg("-getinfo", false)) {
|
||||
rh.reset(new GetinfoRequestHandler());
|
||||
} else if (gArgs.GetBoolArg("-netinfo", false)) {
|
||||
if (!args.empty() && (args.at(0) == "h" || args.at(0) == "help")) {
|
||||
|
|
Loading…
Add table
Reference in a new issue