diff options
-rw-r--r-- | src/bitcoind.cpp | 2 | ||||
-rw-r--r-- | src/interfaces/node.cpp | 2 | ||||
-rwxr-xr-x | test/functional/feature_includeconf.py | 8 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 5c711c0773..4d010c0d14 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -96,7 +96,7 @@ static bool AppInit(int argc, char* argv[]) fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", gArgs.GetArg("-datadir", "").c_str()); return false; } - if (!gArgs.ReadConfigFiles(error)) { + if (!gArgs.ReadConfigFiles(error, true)) { fprintf(stderr, "Error reading configuration file: %s\n", error.c_str()); return false; } diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp index db371d104e..106dd38f60 100644 --- a/src/interfaces/node.cpp +++ b/src/interfaces/node.cpp @@ -53,7 +53,7 @@ class NodeImpl : public Node { return gArgs.ParseParameters(argc, argv, error); } - bool readConfigFiles(std::string& error) override { return gArgs.ReadConfigFiles(error); } + bool readConfigFiles(std::string& error) override { return gArgs.ReadConfigFiles(error, true); } 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); } diff --git a/test/functional/feature_includeconf.py b/test/functional/feature_includeconf.py index 9a7a0ca103..d06f6826f0 100755 --- a/test/functional/feature_includeconf.py +++ b/test/functional/feature_includeconf.py @@ -55,9 +55,11 @@ class IncludeConfTest(BitcoinTestFramework): self.stop_node(0, expected_stderr="warning: -includeconf cannot be used from included files; ignoring -includeconf=relative2.conf") self.log.info("-includeconf cannot contain invalid arg") - with open(os.path.join(self.options.tmpdir, "node0", "relative.conf"), "w", encoding="utf8") as f: - f.write("foo=bar\n") - self.nodes[0].assert_start_raises_init_error(expected_msg="Error reading configuration file: Invalid configuration value foo") + + # Commented out as long as we ignore invalid arguments in configuration files + #with open(os.path.join(self.options.tmpdir, "node0", "relative.conf"), "w", encoding="utf8") as f: + # f.write("foo=bar\n") + #self.nodes[0].assert_start_raises_init_error(expected_msg="Error reading configuration file: Invalid configuration value foo") self.log.info("-includeconf cannot be invalid path") os.remove(os.path.join(self.options.tmpdir, "node0", "relative.conf")) |