mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgs
This commit is contained in:
parent
7b784cc2bb
commit
3450c18a12
6 changed files with 12 additions and 11 deletions
|
|
@ -92,7 +92,7 @@ static bool AppInitRPC(int argc, char* argv[])
|
|||
return false;
|
||||
}
|
||||
try {
|
||||
ReadConfigFile(mapArgs, mapMultiArgs);
|
||||
ReadConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME), mapArgs, mapMultiArgs);
|
||||
} catch (const std::exception& e) {
|
||||
fprintf(stderr,"Error reading configuration file: %s\n", e.what());
|
||||
return false;
|
||||
|
|
@ -209,7 +209,7 @@ UniValue CallRPC(const string& strMethod, const UniValue& params)
|
|||
if (!GetAuthCookie(&strRPCUserColonPass)) {
|
||||
throw runtime_error(strprintf(
|
||||
_("Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file (%s)"),
|
||||
GetConfigFile().string().c_str()));
|
||||
GetConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME)).string().c_str()));
|
||||
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue