// Copyright (c) 2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
#ifndef CHECKQUEUE_H
#define CHECKQUEUE_H
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/locks.hpp>
-#include <boost/thread/condition_variable.hpp>
-
-#include <vector>
#include <algorithm>
+#include <vector>
+
+#include <boost/foreach.hpp>
+#include <boost/thread/condition_variable.hpp>
+#include <boost/thread/locks.hpp>
+#include <boost/thread/mutex.hpp>
template<typename T> class CCheckQueueControl;
nTransactionsUpdated++;
// CTxDB().Close();
bitdb.Flush(false);
- {
- LOCK(cs_main);
- ThreadScriptCheckQuit();
- }
StopNode();
bitdb.Flush(true);
boost::filesystem::remove(GetPidFile());
if (file)
LoadExternalBlockFile(file);
}
- exit(0);
+ StartShutdown();
}
filesystem::path pathBootstrap = GetDataDir() / "bootstrap.dat";
fShutdown = true;
nTransactionsUpdated++;
int64 nStart = GetTime();
+ {
+ LOCK(cs_main);
+ ThreadScriptCheckQuit();
+ }
if (semOutbound)
for (int i=0; i<MAX_OUTBOUND_CONNECTIONS; i++)
semOutbound->post();
if (vnThreadsRunning[THREAD_ADDEDCONNECTIONS] > 0) printf("ThreadOpenAddedConnections still running\n");
if (vnThreadsRunning[THREAD_DUMPADDRESS] > 0) printf("ThreadDumpAddresses still running\n");
if (vnThreadsRunning[THREAD_MINTER] > 0) printf("ThreadStakeMinter still running\n");
- while (vnThreadsRunning[THREAD_MESSAGEHANDLER] > 0 || vnThreadsRunning[THREAD_RPCHANDLER] > 0)
+ if (vnThreadsRunning[THREAD_SCRIPTCHECK] > 0) printf("ThreadScriptCheck still running\n");
+ while (vnThreadsRunning[THREAD_MESSAGEHANDLER] > 0 || vnThreadsRunning[THREAD_RPCHANDLER] > 0 || vnThreadsRunning[THREAD_SCRIPTCHECK] > 0)
Sleep(20);
Sleep(50);
DumpAddresses();