Merge #10447: Make bitcoind invalid argument error message specific
cd5622d Make bitcoind invalid argument error message specific (Wladimir J. van der Laan) Tree-SHA512: 78999b9359685c4090f9a112e1d02bdddac22173f5f04600773b042acb9481ebb54d0f73d9d6d74249f845f497927a58d59de69bf33e3dccf096c3c80c7ebf6b
This commit is contained in:
parent
785420b838
commit
89e033085d
@ -125,17 +125,14 @@ bool AppInit(int argc, char* argv[])
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Command-line RPC
|
// Error out when loose non-argument tokens are encountered on command line
|
||||||
bool fCommandLine = false;
|
for (int i = 1; i < argc; i++) {
|
||||||
for (int i = 1; i < argc; i++)
|
if (!IsSwitchChar(argv[i][0])) {
|
||||||
if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "dash:"))
|
fprintf(stderr, "Error: Command line contains unexpected token '%s', see dashd -h for a list of options.\n", argv[i]);
|
||||||
fCommandLine = true;
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
if (fCommandLine)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Error: There is no RPC client functionality in dashd anymore. Use the dash-cli utility instead.\n");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -server defaults to true for bitcoind but not for the GUI so do this here
|
// -server defaults to true for bitcoind but not for the GUI so do this here
|
||||||
SoftSetBoolArg("-server", true);
|
SoftSetBoolArg("-server", true);
|
||||||
// Set this early so that parameter interactions go to console
|
// Set this early so that parameter interactions go to console
|
||||||
|
Loading…
Reference in New Issue
Block a user