mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Run BDB disk-less for test_bitcoin
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#define BOOST_TEST_MODULE Bitcoin Test Suite
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include "db.h"
|
||||
#include "main.h"
|
||||
#include "wallet.h"
|
||||
|
||||
@@ -14,13 +15,18 @@ struct TestingSetup {
|
||||
TestingSetup() {
|
||||
fPrintToConsole = true; // don't want to write to debug.log file
|
||||
noui_connect();
|
||||
pwalletMain = new CWallet();
|
||||
bitdb.MakeMock();
|
||||
LoadBlockIndex(true);
|
||||
bool fFirstRun;
|
||||
pwalletMain = new CWallet("wallet.dat");
|
||||
pwalletMain->LoadWallet(fFirstRun);
|
||||
RegisterWallet(pwalletMain);
|
||||
}
|
||||
~TestingSetup()
|
||||
{
|
||||
delete pwalletMain;
|
||||
pwalletMain = NULL;
|
||||
bitdb.Flush(true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user