Skip to content

Commit 5c784ca

Browse files
committed
Default to mainnet cookie for liquidv1
1 parent 2cafe40 commit 5c784ca

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/rpc/protocol.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ static const std::string MAINCHAIN_COOKIEAUTH_FILE = "regtest/.cookie";
131131
/** Get name mainchain RPC authentication cookie file */
132132
static fs::path GetMainchainAuthCookieFile()
133133
{
134-
boost::filesystem::path path(gArgs.GetArg("-mainchainrpccookiefile", MAINCHAIN_COOKIEAUTH_FILE));
134+
std::string cookie_file = MAINCHAIN_COOKIEAUTH_FILE;
135+
// Bitcoin mainnet exception
136+
if (gArgs.GetChainName() == "liquidv1") {
137+
cookie_file = ".cookie";
138+
}
139+
boost::filesystem::path path(gArgs.GetArg("-mainchainrpccookiefile", cookie_file));
135140
if (!path.is_complete()) path = GetDataDir(false) / path;
136141
return path;
137142
}

0 commit comments

Comments
 (0)