refactor: Use new GetConfigFilePath function

New function was introduced by willcl-ark <will@256k1.dev> in commit
56e370fbb9 from
https://github.com/bitcoin/bitcoin/pull/27073 and removes some duplicate code.
This commit is contained in:
Ryan Ofsky
2023-02-27 14:14:58 -05:00
parent 6758bd7de7
commit b20b34f5b3
3 changed files with 3 additions and 3 deletions

View File

@@ -121,7 +121,7 @@ bool StartLogging(const ArgsManager& args)
LogPrintf("Using data directory %s\n", fs::PathToString(gArgs.GetDataDirNet()));
// Only log conf file usage message if conf file actually exists.
fs::path config_file_path = GetConfigFile(args.GetPathArg("-conf", BITCOIN_CONF_FILENAME));
fs::path config_file_path = args.GetConfigFilePath();
if (fs::exists(config_file_path)) {
LogPrintf("Config file: %s\n", fs::PathToString(config_file_path));
} else if (args.IsArgSet("-conf")) {