aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-cli.cpp
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2016-11-29 18:45:24 -0800
committerMatt Corallo <git@bluematt.me>2016-12-24 11:29:33 -0500
commit4cd373aea8d20356727f7d65e0bc818beb6523dc (patch)
tree945990959f03be82089270427a7595431459942b /src/bitcoin-cli.cpp
parent71fde5563b5d05a63e3ad08a3c32a9e5ffb952f7 (diff)
Un-expose mapArgs from utils.h
Diffstat (limited to 'src/bitcoin-cli.cpp')
-rw-r--r--src/bitcoin-cli.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index a4360dcd13..29d3cf6747 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -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);