diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-10-03 13:16:40 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-10-03 15:25:09 +0200 |
| commit | a7e5cbb209d4aeb8c2e4c58c92bf214759998056 (patch) | |
| tree | 4f0885ed50a46481db455943f5ea6bdb332a61ec /src/util.cpp | |
| parent | Merge #8860: [qa] util: Move wait_bitcoinds() into stop_nodes() (diff) | |
| parent | Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgs (diff) | |
| download | discoin-a7e5cbb209d4aeb8c2e4c58c92bf214759998056.tar.xz discoin-a7e5cbb209d4aeb8c2e4c58c92bf214759998056.zip | |
Merge #8856: Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgs
3450c18 Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgs (Jorge Timón)
Diffstat (limited to 'src/util.cpp')
| -rw-r--r-- | src/util.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/util.cpp b/src/util.cpp index 93cc0412b..c20ede622 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -518,19 +518,20 @@ void ClearDatadirCache() pathCachedNetSpecific = boost::filesystem::path(); } -boost::filesystem::path GetConfigFile() +boost::filesystem::path GetConfigFile(const std::string& confPath) { - boost::filesystem::path pathConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME)); + boost::filesystem::path pathConfigFile(confPath); if (!pathConfigFile.is_complete()) pathConfigFile = GetDataDir(false) / pathConfigFile; return pathConfigFile; } -void ReadConfigFile(map<string, string>& mapSettingsRet, +void ReadConfigFile(const std::string& confPath, + map<string, string>& mapSettingsRet, map<string, vector<string> >& mapMultiSettingsRet) { - boost::filesystem::ifstream streamConfig(GetConfigFile()); + boost::filesystem::ifstream streamConfig(GetConfigFile(confPath)); if (!streamConfig.good()) return; // No bitcoin.conf file is OK |