Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 2,677 Lines • ▼ Show 20 Lines | #if defined(HAVE_SYSTEM) | ||||
} | } | ||||
#endif | #endif | ||||
std::vector<fs::path> vImportFiles; | std::vector<fs::path> vImportFiles; | ||||
for (const std::string &strFile : args.GetArgs("-loadblock")) { | for (const std::string &strFile : args.GetArgs("-loadblock")) { | ||||
vImportFiles.push_back(fs::PathFromString(strFile)); | vImportFiles.push_back(fs::PathFromString(strFile)); | ||||
} | } | ||||
chainman.m_load_block = std::thread( | chainman.m_load_block = | ||||
&util::TraceThread, "loadblk", [=, &config, &chainman, &args] { | std::thread(&util::TraceThread, "loadblk", [=, &chainman, &args] { | ||||
ThreadImport(config, chainman, vImportFiles, args, | ThreadImport(chainman, vImportFiles, args, | ||||
ShouldPersistMempool(args) ? MempoolPath(args) | ShouldPersistMempool(args) ? MempoolPath(args) | ||||
: fs::path{}); | : fs::path{}); | ||||
}); | }); | ||||
// Wait for genesis block to be processed | // Wait for genesis block to be processed | ||||
{ | { | ||||
WAIT_LOCK(g_genesis_wait_mutex, lock); | WAIT_LOCK(g_genesis_wait_mutex, lock); | ||||
// We previously could hang here if StartShutdown() is called prior to | // We previously could hang here if StartShutdown() is called prior to | ||||
▲ Show 20 Lines • Show All 246 Lines • Show Last 20 Lines |