tests should compile now

This commit is contained in:
UdjinM6 2015-04-05 01:58:10 +03:00
parent 3f3b6bb3cb
commit e54c11aabb

View File

@ -4,13 +4,11 @@
#define BOOST_TEST_MODULE Bitcoin Test Suite #define BOOST_TEST_MODULE Bitcoin Test Suite
#include "main.h" #include "main.h"
#include "random.h"
#include "txdb.h" #include "txdb.h"
#include "ui_interface.h" #include "ui_interface.h"
#include "util.h" #include "util.h"
#include "activemasternode.h"
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
#include "db.h" #include "db.h"
#include "wallet.h" #include "wallet.h"
@ -18,8 +16,9 @@
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <boost/thread.hpp>
CClientUIInterface uiInterface;
CWallet* pwalletMain; CWallet* pwalletMain;
extern bool fPrintToConsole; extern bool fPrintToConsole;
@ -32,6 +31,7 @@ struct TestingSetup {
TestingSetup() { TestingSetup() {
fPrintToDebugLog = false; // don't want to write to debug.log file fPrintToDebugLog = false; // don't want to write to debug.log file
SelectParams(CBaseChainParams::UNITTEST);
noui_connect(); noui_connect();
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
bitdb.MakeMock(); bitdb.MakeMock();
@ -41,13 +41,13 @@ struct TestingSetup {
mapArgs["-datadir"] = pathTemp.string(); mapArgs["-datadir"] = pathTemp.string();
pblocktree = new CBlockTreeDB(1 << 20, true); pblocktree = new CBlockTreeDB(1 << 20, true);
pcoinsdbview = new CCoinsViewDB(1 << 23, true); pcoinsdbview = new CCoinsViewDB(1 << 23, true);
pcoinsTip = new CCoinsViewCache(*pcoinsdbview); pcoinsTip = new CCoinsViewCache(pcoinsdbview);
InitBlockIndex(); InitBlockIndex();
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
bool fFirstRun; bool fFirstRun;
pwalletMain = new CWallet("wallet.dat"); pwalletMain = new CWallet("wallet.dat");
pwalletMain->LoadWallet(fFirstRun); pwalletMain->LoadWallet(fFirstRun);
RegisterWallet(pwalletMain); RegisterValidationInterface(pwalletMain);
#endif #endif
nScriptCheckThreads = 3; nScriptCheckThreads = 3;
for (int i=0; i < nScriptCheckThreads-1; i++) for (int i=0; i < nScriptCheckThreads-1; i++)
@ -89,4 +89,3 @@ bool ShutdownRequested()
{ {
return false; return false;
} }