|
|
|
@ -112,7 +112,7 @@ void Shutdown()
@@ -112,7 +112,7 @@ void Shutdown()
|
|
|
|
|
TRY_LOCK(cs_Shutdown, lockShutdown); |
|
|
|
|
if (!lockShutdown) return; |
|
|
|
|
|
|
|
|
|
RenameThread("bitcoin-shutoff"); |
|
|
|
|
RenameThread("gostcoin-shutoff"); |
|
|
|
|
nTransactionsUpdated++; |
|
|
|
|
StopRPCThreads(); |
|
|
|
|
ShutdownRPCMining(); |
|
|
|
@ -190,7 +190,7 @@ bool AppInit(int argc, char* argv[])
@@ -190,7 +190,7 @@ bool AppInit(int argc, char* argv[])
|
|
|
|
|
//
|
|
|
|
|
// Parameters
|
|
|
|
|
//
|
|
|
|
|
// If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's main()
|
|
|
|
|
// If Qt is used, parameters/gostcoin.conf are parsed in qt/gostcoin.cpp's main()
|
|
|
|
|
ParseParameters(argc, argv); |
|
|
|
|
if (!boost::filesystem::is_directory(GetDataDir(false))) |
|
|
|
|
{ |
|
|
|
@ -205,7 +205,7 @@ bool AppInit(int argc, char* argv[])
@@ -205,7 +205,7 @@ bool AppInit(int argc, char* argv[])
|
|
|
|
|
|
|
|
|
|
if (mapArgs.count("-?") || mapArgs.count("--help")) |
|
|
|
|
{ |
|
|
|
|
// First part of help message is specific to bitcoind / RPC client
|
|
|
|
|
// First part of help message is specific to gostcoind / RPC client
|
|
|
|
|
std::string strUsage = _("GOSTcoin version") + " " + FormatFullVersion() + "\n\n" + |
|
|
|
|
_("Usage:") + "\n" + |
|
|
|
|
" gostcoind [options] " + "\n" + |
|
|
|
@ -283,7 +283,7 @@ int main(int argc, char* argv[])
@@ -283,7 +283,7 @@ int main(int argc, char* argv[])
|
|
|
|
|
{ |
|
|
|
|
bool fRet = false; |
|
|
|
|
|
|
|
|
|
// Connect bitcoind signal handlers
|
|
|
|
|
// Connect gostcoind signal handlers
|
|
|
|
|
noui_connect(); |
|
|
|
|
|
|
|
|
|
fRet = AppInit(argc, argv); |
|
|
|
@ -480,7 +480,7 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
@@ -480,7 +480,7 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** Initialize bitcoin.
|
|
|
|
|
/** Initialize gostcoin.
|
|
|
|
|
* @pre Parameters should be parsed and config file should be read. |
|
|
|
|
*/ |
|
|
|
|
bool AppInit2(boost::thread_group& threadGroup) |
|
|
|
@ -711,7 +711,7 @@ bool AppInit2(boost::thread_group& threadGroup)
@@ -711,7 +711,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|
|
|
|
|
|
|
|
|
std::string strDataDir = GetDataDir().string(); |
|
|
|
|
|
|
|
|
|
// Make sure only a single Bitcoin process is using the data directory.
|
|
|
|
|
// Make sure only a single GOSTCoin 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); |
|
|
|
@ -1020,7 +1020,7 @@ bool AppInit2(boost::thread_group& threadGroup)
@@ -1020,7 +1020,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// as LoadBlockIndex can take several minutes, it's possible the user
|
|
|
|
|
// requested to kill bitcoin-qt during the last operation. If so, exit.
|
|
|
|
|
// requested to kill gostcoin-qt during the last operation. If so, exit.
|
|
|
|
|
// As the program has not fully started yet, Shutdown() is possibly overkill.
|
|
|
|
|
if (fRequestShutdown) |
|
|
|
|
{ |
|
|
|
|