diff options
| author | Andrew Chow <[email protected]> | 2018-04-28 19:40:51 -0400 |
|---|---|---|
| committer | Andrew Chow <[email protected]> | 2018-05-30 11:27:50 -0400 |
| commit | 4f8704d57f8fb2958a43534779b20201b77eecae (patch) | |
| tree | 4ccb64e2e65e99726786919d6d0feecde2e26377 /src/interfaces/node.cpp | |
| parent | Use a struct for arguments and nested map for categories (diff) | |
| download | discoin-4f8704d57f8fb2958a43534779b20201b77eecae.tar.xz discoin-4f8704d57f8fb2958a43534779b20201b77eecae.zip | |
Give an error and exit if there are unknown parameters
If an unknown option is given via either the command line args or
the conf file, throw an error and exit
Update tests for ArgsManager knowing args
Ignore unknown options in the config file for bitcoin-cli
Fix tests and bitcoin-cli to match actual options used
Diffstat (limited to 'src/interfaces/node.cpp')
| -rw-r--r-- | src/interfaces/node.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp index 927035117..4189ff749 100644 --- a/src/interfaces/node.cpp +++ b/src/interfaces/node.cpp @@ -48,11 +48,11 @@ namespace { class NodeImpl : public Node { - void parseParameters(int argc, const char* const argv[]) override + bool parseParameters(int argc, const char* const argv[], std::string& error) override { - gArgs.ParseParameters(argc, argv); + return gArgs.ParseParameters(argc, argv, error); } - void readConfigFiles() override { gArgs.ReadConfigFiles(); } + bool readConfigFiles(std::string& error) override { return gArgs.ReadConfigFiles(error); } bool softSetArg(const std::string& arg, const std::string& value) override { return gArgs.SoftSetArg(arg, value); } bool softSetBoolArg(const std::string& arg, bool value) override { return gArgs.SoftSetBoolArg(arg, value); } void selectParams(const std::string& network) override { SelectParams(network); } |