diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 7aa9dc1ea1a..863b495fb25 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -1248,7 +1248,7 @@ static int CommandLineRPC(int argc, char *argv[]) gArgs.CheckMultipleCLIArgs(); std::unique_ptr 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")) {