MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / AppInitSanityChecks

Function AppInitSanityChecks

src/init.cpp:1193–1212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1191}
1192
1193bool AppInitSanityChecks()
1194{
1195 // ********************************************************* Step 4: sanity checks
1196
1197 // Initialize elliptic curve code
1198 std::string sha256_algo = SHA256AutoDetect();
1199 LogPrintf("Using the '%s' SHA256 implementation\n", sha256_algo);
1200 RandomInit();
1201 ECC_Start();
1202 globalVerifyHandle.reset(new ECCVerifyHandle());
1203
1204 // Sanity check
1205 if (!InitSanityCheck())
1206 return InitError(strprintf(_("Initialization sanity check failed. %s is shutting down."), _(PACKAGE_NAME)));
1207
1208 // Probe the data directory lock to give an early error message, if possible
1209 // We cannot hold the data directory lock here, as the forking for daemon() hasn't yet happened,
1210 // and a fork will cause weird behavior to it.
1211 return LockDataDirectory(true);
1212}
1213
1214bool AppInitLockDataDirectory()
1215{

Callers 2

AppInitFunction · 0.85
baseInitializeMethod · 0.85

Calls 8

SHA256AutoDetectFunction · 0.85
RandomInitFunction · 0.85
ECC_StartFunction · 0.85
InitSanityCheckFunction · 0.85
InitErrorFunction · 0.85
_Function · 0.85
LockDataDirectoryFunction · 0.85
resetMethod · 0.45

Tested by

no test coverage detected