mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-30 05:52:33 +02:00
cli: more robust bitcoin-cli -getinfo command parsing
per Luke Dashjr review feedback in PR 18594
This commit is contained in:
parent
bbbf89a9de
commit
d7d77a38b3
@ -1162,7 +1162,7 @@ static int CommandLineRPC(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
std::unique_ptr<BaseRequestHandler> rh;
|
std::unique_ptr<BaseRequestHandler> rh;
|
||||||
std::string method;
|
std::string method;
|
||||||
if (gArgs.IsArgSet("-getinfo")) {
|
if (gArgs.GetBoolArg("-getinfo", false)) {
|
||||||
rh.reset(new GetinfoRequestHandler());
|
rh.reset(new GetinfoRequestHandler());
|
||||||
} else if (gArgs.GetBoolArg("-netinfo", false)) {
|
} else if (gArgs.GetBoolArg("-netinfo", false)) {
|
||||||
if (!args.empty() && args.at(0) == "help") {
|
if (!args.empty() && args.at(0) == "help") {
|
||||||
|
Loading…
Reference in New Issue
Block a user