Get name mainchain RPC authentication cookie file */
| 136 | static const std::string MAINCHAIN_COOKIEAUTH_FILE = "regtest/.cookie"; |
| 137 | /** Get name mainchain RPC authentication cookie file */ |
| 138 | static fs::path GetMainchainAuthCookieFile() |
| 139 | { |
| 140 | std::string cookie_file = MAINCHAIN_COOKIEAUTH_FILE; |
| 141 | // Bitcoin mainnet exception |
| 142 | if (gArgs.GetChainName() == "liquidv1") { |
| 143 | cookie_file = ".cookie"; |
| 144 | } |
| 145 | fs::path cookie_path = fs::PathFromString(gArgs.GetArg("-mainchainrpccookiefile", cookie_file)); |
| 146 | if (cookie_path.is_absolute()) |
| 147 | return cookie_path; |
| 148 | return fsbridge::AbsPathJoin(GetMainchainDefaultDataDir(), cookie_path); |
| 149 | } |
| 150 | |
| 151 | bool GetMainchainAuthCookie(std::string *cookie_out) |
| 152 | { |
no test coverage detected