aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoind.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r--src/bitcoind.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 31680a8ec7..374678310c 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -20,7 +20,6 @@
#include "httprpc.h"
#include "utilstrencodings.h"
-#include <boost/algorithm/string/predicate.hpp>
#include <boost/thread.hpp>
#include <stdio.h>
@@ -117,17 +116,14 @@ bool AppInit(int argc, char* argv[])
return false;
}
- // Command-line RPC
- bool fCommandLine = false;
- for (int i = 1; i < argc; i++)
- if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "bitcoin:"))
- fCommandLine = true;
-
- if (fCommandLine)
- {
- fprintf(stderr, "Error: There is no RPC client functionality in bitcoind anymore. Use the bitcoin-cli utility instead.\n");
- exit(EXIT_FAILURE);
+ // Error out when loose non-argument tokens are encountered on command line
+ for (int i = 1; i < argc; i++) {
+ if (!IsSwitchChar(argv[i][0])) {
+ fprintf(stderr, "Error: Command line contains unexpected token '%s', see bitcoind -h for a list of options.\n", argv[i]);
+ exit(EXIT_FAILURE);
+ }
}
+
// -server defaults to true for bitcoind but not for the GUI so do this here
SoftSetBoolArg("-server", true);
// Set this early so that parameter interactions go to console