mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Default to mainnet cookie for liquidv1
This commit is contained in:
parent
8ea52eec38
commit
5273ed5bec
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue