From a58d2293c2da2cfaa00ca3b8ded9fbcef5b6a4dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Tim=C3=B3n?= Date: Mon, 6 Nov 2017 19:38:57 +0100 Subject: [PATCH] 2wp: -mainchainrpccookiefile defaults to regtest/.cookie for all chains --- src/rpc/protocol.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/protocol.cpp b/src/rpc/protocol.cpp index 089e8162b8..338718b7f4 100644 --- a/src/rpc/protocol.cpp +++ b/src/rpc/protocol.cpp @@ -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; }