Merge 8303f11e10 into merged_master (Bitcoin PR bitcoin/bitcoin#27170)

This commit is contained in:
Byron Hambly 2025-04-09 12:38:49 +02:00
commit 4d00218319
10 changed files with 25 additions and 23 deletions

View file

@ -161,7 +161,7 @@ static int AppInitRPC(int argc, char* argv[])
}
return EXIT_SUCCESS;
}
if (!CheckDataDirOption()) {
if (!CheckDataDirOption(gArgs)) {
tfm::format(std::cerr, "Error: Specified data directory \"%s\" does not exist.\n", gArgs.GetArg("-datadir", ""));
return EXIT_FAILURE;
}
@ -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");
}