aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-cli.cpp
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2023-02-27 14:14:58 -0500
committerRyan Ofsky <ryan@ofsky.org>2023-02-27 14:14:58 -0500
commitb20b34f5b33230fe253c81008496bd9b13fd6ecf (patch)
treed4e44e329fe5163827cd6d0c1f574747c1bed88d /src/bitcoin-cli.cpp
parent6758bd7de75d65d08f9f588378b92a56cc79a49e (diff)
downloadbitcoin-b20b34f5b33230fe253c81008496bd9b13fd6ecf.tar.xz
refactor: Use new GetConfigFilePath function
New function was introduced by willcl-ark <will@256k1.dev> in commit 56e370fbb9413260723c598048392219b1055ad0 from https://github.com/bitcoin/bitcoin/pull/27073 and removes some duplicate code.
Diffstat (limited to 'src/bitcoin-cli.cpp')
-rw-r--r--src/bitcoin-cli.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index df8fb7cece..3cb25e5c01 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -817,7 +817,7 @@ static UniValue CallRPC(BaseRequestHandler* rh, const std::string& strMethod, co
if (failedToGetAuthCookie) {
throw std::runtime_error(strprintf(
"Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set. See -rpcpassword and -stdinrpcpass. Configuration file: (%s)",
- fs::PathToString(GetConfigFile(gArgs.GetPathArg("-conf", BITCOIN_CONF_FILENAME)))));
+ fs::PathToString(gArgs.GetConfigFilePath())));
} else {
throw std::runtime_error("Authorization failed: Incorrect rpcuser or rpcpassword");
}