mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Detect mainchain cookie auth using datadir checking, not mapArgs
This commit is contained in:
parent
c868ef325e
commit
424a85fcdd
1 changed files with 3 additions and 3 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include "utilstrencodings.h"
|
||||
#include "utiltime.h"
|
||||
#include "version.h"
|
||||
#include "chainparamsbase.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <fstream>
|
||||
|
|
@ -78,9 +79,8 @@ boost::filesystem::path GetAuthCookieFile()
|
|||
boost::filesystem::path GetMainchainAuthCookieFile()
|
||||
{
|
||||
boost::filesystem::path path(GetArg("-mainchainrpccookiefile", COOKIEAUTH_FILE));
|
||||
//Change to default false for live network
|
||||
if (!path.is_complete() && GetBoolArg("-testnet", true)) path = "testnet3" / path;
|
||||
if (!path.is_complete() && GetBoolArg("-regtest", false)) path = "regtest" / path;
|
||||
if (!path.is_complete() && BaseParams().DataDir() == CHAINPARAMS_ELEMENTS) path = "testnet3" / path;
|
||||
if (!path.is_complete() && BaseParams().DataDir() == CHAINPARAMS_REGTEST) path = "regtest" / path;
|
||||
if (!path.is_complete()) path = GetDataDir(false) / path;
|
||||
return path;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue