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