|
|
@ -11,6 +11,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include "addrman.h" |
|
|
|
#include "addrman.h" |
|
|
|
#include "checkpoints.h" |
|
|
|
#include "checkpoints.h" |
|
|
|
|
|
|
|
#include "key.h" |
|
|
|
#include "main.h" |
|
|
|
#include "main.h" |
|
|
|
#include "miner.h" |
|
|
|
#include "miner.h" |
|
|
|
#include "net.h" |
|
|
|
#include "net.h" |
|
|
@ -394,6 +395,23 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Sanity checks
|
|
|
|
|
|
|
|
* Ensure that Bitcoin is running in a usable environment with all |
|
|
|
|
|
|
|
* necessary library support. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
bool InitSanityCheck(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if(!ECC_InitSanityCheck()) { |
|
|
|
|
|
|
|
InitError("OpenSSL appears to lack support for elliptic curve cryptography. For more " |
|
|
|
|
|
|
|
"information, visit https://en.bitcoin.it/wiki/OpenSSL_and_EC_Libraries"); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: remaining sanity checks, see #4081
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** Initialize bitcoin.
|
|
|
|
/** Initialize bitcoin.
|
|
|
|
* @pre Parameters should be parsed and config file should be read. |
|
|
|
* @pre Parameters should be parsed and config file should be read. |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -598,6 +616,9 @@ bool AppInit2(boost::thread_group& threadGroup) |
|
|
|
std::string strWalletFile = GetArg("-wallet", "wallet.dat"); |
|
|
|
std::string strWalletFile = GetArg("-wallet", "wallet.dat"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
// ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
|
|
|
|
// ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
|
|
|
|
|
|
|
|
// Sanity check
|
|
|
|
|
|
|
|
if (!InitSanityCheck()) |
|
|
|
|
|
|
|
return InitError(_("Initialization sanity check failed. Bitcoin Core is shutting down.")); |
|
|
|
|
|
|
|
|
|
|
|
std::string strDataDir = GetDataDir().string(); |
|
|
|
std::string strDataDir = GetDataDir().string(); |
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
#ifdef ENABLE_WALLET |
|
|
|