mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
2wp: -mainchainrpccookiefile defaults to regtest/.cookie for all chains
This commit is contained in:
parent
b979d44271
commit
a58d2293c2
1 changed files with 2 additions and 2 deletions
|
|
@ -68,6 +68,7 @@ UniValue JSONRPCError(int code, const string& message)
|
|||
static const std::string COOKIEAUTH_USER = "__cookie__";
|
||||
/** Default name for auth cookie file */
|
||||
static const std::string COOKIEAUTH_FILE = ".cookie";
|
||||
static const std::string MAINCHAIN_COOKIEAUTH_FILE = "regtest/.cookie";
|
||||
|
||||
boost::filesystem::path GetAuthCookieFile()
|
||||
{
|
||||
|
|
@ -78,8 +79,7 @@ boost::filesystem::path GetAuthCookieFile()
|
|||
|
||||
boost::filesystem::path GetMainchainAuthCookieFile()
|
||||
{
|
||||
boost::filesystem::path path(GetArg("-mainchainrpccookiefile", COOKIEAUTH_FILE));
|
||||
if (!path.is_complete() && BaseParams().DataDir() == CHAINPARAMS_REGTEST) path = "regtest" / path;
|
||||
boost::filesystem::path path(GetArg("-mainchainrpccookiefile", MAINCHAIN_COOKIEAUTH_FILE));
|
||||
if (!path.is_complete()) path = GetDataDir(false) / path;
|
||||
return path;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue