MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetMainchainAuthCookie

Function GetMainchainAuthCookie

src/rpc/request.cpp:151–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151bool GetMainchainAuthCookie(std::string *cookie_out)
152{
153 std::ifstream file;
154 std::string cookie;
155
156 std::filesystem::path filepath = GetMainchainAuthCookieFile();
157 file.open(filepath);
158 if (!file.is_open())
159 return false;
160 std::getline(file, cookie);
161 file.close();
162
163 if (cookie_out)
164 *cookie_out = cookie;
165 return true;
166}
167
168// END ELEMENTS
169//

Callers 1

CallMainChainRPCFunction · 0.85

Calls 3

openMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected