|
|
@ -217,16 +217,16 @@ bool AppInit(int argc, char* argv[]) |
|
|
|
PrintExceptionContinue(NULL, "AppInit()"); |
|
|
|
PrintExceptionContinue(NULL, "AppInit()"); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!fRet) { |
|
|
|
if (!fRet) { |
|
|
|
if (detectShutdownThread) |
|
|
|
if (detectShutdownThread) |
|
|
|
detectShutdownThread->interrupt(); |
|
|
|
detectShutdownThread->interrupt(); |
|
|
|
threadGroup.interrupt_all(); |
|
|
|
threadGroup.interrupt_all(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (detectShutdownThread) |
|
|
|
if (detectShutdownThread) |
|
|
|
{ |
|
|
|
{ |
|
|
|
detectShutdownThread->join(); |
|
|
|
detectShutdownThread->join(); |
|
|
|
delete detectShutdownThread; |
|
|
|
delete detectShutdownThread; |
|
|
|
detectShutdownThread = NULL; |
|
|
|
detectShutdownThread = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
Shutdown(); |
|
|
|
Shutdown(); |
|
|
|
|
|
|
|
|
|
|
@ -376,7 +376,6 @@ struct CImportingNow |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ThreadImport(std::vector<boost::filesystem::path> vImportFiles) |
|
|
|
void ThreadImport(std::vector<boost::filesystem::path> vImportFiles) |
|
|
|
{ |
|
|
|
{ |
|
|
|
RenameThread("bitcoin-loadblk"); |
|
|
|
RenameThread("bitcoin-loadblk"); |
|
|
@ -633,7 +632,6 @@ bool AppInit2(boost::thread_group& threadGroup) |
|
|
|
// ********************************************************* Step 6: network initialization
|
|
|
|
// ********************************************************* Step 6: network initialization
|
|
|
|
|
|
|
|
|
|
|
|
int nSocksVersion = GetArg("-socks", 5); |
|
|
|
int nSocksVersion = GetArg("-socks", 5); |
|
|
|
|
|
|
|
|
|
|
|
if (nSocksVersion != 4 && nSocksVersion != 5) |
|
|
|
if (nSocksVersion != 4 && nSocksVersion != 5) |
|
|
|
return InitError(strprintf(_("Unknown -socks proxy version requested: %i"), nSocksVersion)); |
|
|
|
return InitError(strprintf(_("Unknown -socks proxy version requested: %i"), nSocksVersion)); |
|
|
|
|
|
|
|
|
|
|
@ -733,6 +731,7 @@ bool AppInit2(boost::thread_group& threadGroup) |
|
|
|
|
|
|
|
|
|
|
|
fReindex = GetBoolArg("-reindex"); |
|
|
|
fReindex = GetBoolArg("-reindex"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Todo: Check if needed, because in step 5 we do the same
|
|
|
|
if (!bitdb.Open(GetDataDir())) |
|
|
|
if (!bitdb.Open(GetDataDir())) |
|
|
|
{ |
|
|
|
{ |
|
|
|
string msg = strprintf(_("Error initializing database environment %s!" |
|
|
|
string msg = strprintf(_("Error initializing database environment %s!" |
|
|
|