mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Un-expose mapArgs from utils.h
This commit is contained in:
parent
71fde5563b
commit
4cd373aea8
14 changed files with 30 additions and 24 deletions
|
|
@ -95,7 +95,7 @@ static int AppInitRPC(int argc, char* argv[])
|
|||
return EXIT_SUCCESS;
|
||||
}
|
||||
if (!boost::filesystem::is_directory(GetDataDir(false))) {
|
||||
fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", mapArgs["-datadir"].c_str());
|
||||
fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", GetArg("-datadir", "").c_str());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
try {
|
||||
|
|
@ -211,7 +211,7 @@ UniValue CallRPC(const std::string& strMethod, const UniValue& params)
|
|||
|
||||
// Get credentials
|
||||
std::string strRPCUserColonPass;
|
||||
if (mapArgs["-rpcpassword"] == "") {
|
||||
if (GetArg("-rpcpassword", "") == "") {
|
||||
// Try fall back to cookie-based authentication if no password is provided
|
||||
if (!GetAuthCookie(&strRPCUserColonPass)) {
|
||||
throw std::runtime_error(strprintf(
|
||||
|
|
@ -220,7 +220,7 @@ UniValue CallRPC(const std::string& strMethod, const UniValue& params)
|
|||
|
||||
}
|
||||
} else {
|
||||
strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"];
|
||||
strRPCUserColonPass = GetArg("-rpcuser", "") + ":" + GetArg("-rpcpassword", "");
|
||||
}
|
||||
|
||||
struct evkeyvalq *output_headers = evhttp_request_get_output_headers(req);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue