|
|
@ -701,7 +701,7 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles) |
|
|
|
} |
|
|
|
|
|
|
|
/** Sanity checks
|
|
|
|
* Ensure that Bitcoin is running in a usable environment with all |
|
|
|
* Ensure that Hush is running in a usable environment with all |
|
|
|
* necessary library support. |
|
|
|
*/ |
|
|
|
bool InitSanityCheck(void) |
|
|
@ -764,7 +764,9 @@ bool AppInitServers(boost::thread_group& threadGroup) |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
/** Initialize bitcoin.
|
|
|
|
int32_t komodo_init(); |
|
|
|
|
|
|
|
/** Initialize Hush
|
|
|
|
* @pre Parameters should be parsed and config file should be read. |
|
|
|
*/ |
|
|
|
bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) |
|
|
@ -915,6 +917,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) |
|
|
|
if (nFD - MIN_CORE_FILEDESCRIPTORS < nMaxConnections) |
|
|
|
nMaxConnections = nFD - MIN_CORE_FILEDESCRIPTORS; |
|
|
|
|
|
|
|
komodo_init(); |
|
|
|
|
|
|
|
// if using block pruning, then disable txindex
|
|
|
|
// also disable the wallet (for now, until SPV support is implemented in wallet)
|
|
|
|
if (GetArg("-prune", 0)) { |
|
|
@ -1108,7 +1112,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) |
|
|
|
if (strWalletFile != boost::filesystem::basename(strWalletFile) + boost::filesystem::extension(strWalletFile)) |
|
|
|
return InitError(strprintf(_("Wallet %s resides outside data directory %s"), strWalletFile, strDataDir)); |
|
|
|
#endif |
|
|
|
// Make sure only a single Bitcoin process is using the data directory.
|
|
|
|
// Make sure only a single Hush process is using the data directory.
|
|
|
|
boost::filesystem::path pathLockFile = GetDataDir() / ".lock"; |
|
|
|
FILE* file = fopen(pathLockFile.string().c_str(), "a"); // empty lock file; created if it doesn't exist.
|
|
|
|
if (file) fclose(file); |
|
|
|