mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-13 22:24:05 +01:00
Merge bitcoin/bitcoin#24675: util: Use ArgsManager::GetPathArg more widely
b01f336708util, refactor: Drop explicit conversion to fs::path (Hennadii Stepanov)138c668e2butil, refactor: Use GetPathArg to read "-rpccookiefile" value (Hennadii Stepanov)1276090705util, refactor: Use GetPathArg to read "-conf" value (Hennadii Stepanov) Pull request description: This PR is a continuation of bitcoin/bitcoin#24265 and bitcoin/bitcoin#24306. Now the following command-line arguments / configure options been read with the `GetPathArg` method: - `-conf`, also `includeconf` values been normalized - `-rpccookiefile` ACKs for top commit: jarolrod: Code Review ACKb01f336708ryanofsky: Code review ACKb01f336708. Changes since last review: just dropping first commit (NormalizedPathFromString) as suggested Tree-SHA512: 2d26d50b73542acdbcc63a32068977b2a49a017d31ca337471a0446f964eb0a6e3e4e3bb1ebe6771566a260f2cae3bc2ebe93b4b523183cea0d51768daab85c9
This commit is contained in:
@@ -807,7 +807,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.GetArg("-conf", BITCOIN_CONF_FILENAME)))));
|
||||
fs::PathToString(GetConfigFile(gArgs.GetPathArg("-conf", BITCOIN_CONF_FILENAME)))));
|
||||
} else {
|
||||
throw std::runtime_error("Authorization failed: Incorrect rpcuser or rpcpassword");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user