From 5273ed5bec2fe6c1a37a0103d4ff4403067ced91 Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Thu, 21 Mar 2019 07:38:49 -0400 Subject: [PATCH] Default to mainnet cookie for liquidv1 --- src/rpc/protocol.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rpc/protocol.cpp b/src/rpc/protocol.cpp index 42ff067d9b..d0ccd5dc64 100644 --- a/src/rpc/protocol.cpp +++ b/src/rpc/protocol.cpp @@ -131,7 +131,12 @@ static const std::string MAINCHAIN_COOKIEAUTH_FILE = "regtest/.cookie"; /** Get name mainchain RPC authentication cookie file */ static fs::path GetMainchainAuthCookieFile() { - boost::filesystem::path path(gArgs.GetArg("-mainchainrpccookiefile", MAINCHAIN_COOKIEAUTH_FILE)); + std::string cookie_file = MAINCHAIN_COOKIEAUTH_FILE; + // Bitcoin mainnet exception + if (gArgs.GetChainName() == "liquidv1") { + cookie_file = ".cookie"; + } + boost::filesystem::path path(gArgs.GetArg("-mainchainrpccookiefile", cookie_file)); if (!path.is_complete()) path = GetDataDir(false) / path; return path; }