aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test_bitcoin.cpp')
-rw-r--r--src/test/test_bitcoin.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index b98816d53..1bf9a28ac 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -17,6 +17,7 @@ extern void noui_connect();
struct TestingSetup {
CCoinsViewDB *pcoinsdbview;
boost::filesystem::path pathTemp;
+ boost::thread_group threadGroup;
TestingSetup() {
fPrintToDebugger = true; // don't want to write to debug.log file
@@ -28,14 +29,19 @@ struct TestingSetup {
pblocktree = new CBlockTreeDB(1 << 20, true);
pcoinsdbview = new CCoinsViewDB(1 << 23, true);
pcoinsTip = new CCoinsViewCache(*pcoinsdbview);
- LoadBlockIndex();
+ InitBlockIndex();
bool fFirstRun;
pwalletMain = new CWallet("wallet.dat");
pwalletMain->LoadWallet(fFirstRun);
RegisterWallet(pwalletMain);
+ nScriptCheckThreads = 3;
+ for (int i=0; i < nScriptCheckThreads-1; i++)
+ threadGroup.create_thread(&ThreadScriptCheck);
}
~TestingSetup()
{
+ threadGroup.interrupt_all();
+ threadGroup.join_all();
delete pwalletMain;
pwalletMain = NULL;
delete pcoinsTip;