Exemplo n.º 1
0
    TestingSetup() {
        fPrintToDebugLog = false; // don't want to write to debug.log file
        noui_connect();
#ifdef ENABLE_WALLET
        bitdb.MakeMock();
#endif
        pathTemp = GetTempPath() / strprintf("test_bitcoin_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000)));
        boost::filesystem::create_directories(pathTemp);
        mapArgs["-datadir"] = pathTemp.string();
	mapArgs["-testnet"] = "true";
        pblocktree = new CBlockTreeDB(1 << 20, true);
        pviewTip = new TrieView();
	LoadBlockIndex();
	printf("Loaded\n");
        // If the loaded chain has a wrong genesis, bail out immediately
        // (we're likely using a testnet datadir, or the other way around).
        if (!mapBlockIndex.empty() && chainActive.Genesis() == NULL)
        	printf("Incorrect or no genesis block found. Wrong datadir for network?");
        InitBlockIndex();
	printf("Init Done\n");
#ifdef ENABLE_WALLET
        bool fFirstRun;
        pwalletMain = new CWallet("wallet.dat");
        pwalletMain->LoadWallet(fFirstRun);
        RegisterWallet(pwalletMain);
#endif
        nScriptCheckThreads = 3;
        for (int i=0; i < nScriptCheckThreads-1; i++)
            threadGroup.create_thread(&ThreadScriptCheck);
        RegisterNodeSignals(GetNodeSignals());
    }
Exemplo n.º 2
0
	TestingSetup()
	{
		fPrintToConsole = true; // don't want to write to debug.log file
		noui_connect();
		pwalletMain = new CWallet();
		RegisterWallet(pwalletMain);
	}
Exemplo n.º 3
0
    TestingSetup() {
        fPrintToDebugLog = false; // don't want to write to debug.log file
        SelectParams(CBaseChainParams::MAIN);
        noui_connect();
#ifdef ENABLE_WALLET
        bitdb.MakeMock();
#endif
        pathTemp = GetTempPath() / strprintf("test_bitcoin_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000)));
        boost::filesystem::create_directories(pathTemp);
        mapArgs["-datadir"] = pathTemp.string();
        pblocktree = new CBlockTreeDB(1 << 20, true);
        pcoinsdbview = new CCoinsViewDB(1 << 23, true);
        pcoinsTip = new CCoinsViewCache(*pcoinsdbview);
        InitBlockIndex();
#ifdef ENABLE_WALLET
        bool fFirstRun;
        pwalletMain = new CWallet("wallet.dat");
        pwalletMain->LoadWallet(fFirstRun);
        RegisterWallet(pwalletMain);
#endif
        nScriptCheckThreads = 3;
        for (int i=0; i < nScriptCheckThreads-1; i++)
            threadGroup.create_thread(&ThreadScriptCheck);
        RegisterNodeSignals(GetNodeSignals());
    }
Exemplo n.º 4
0
 TestingSetup() {
     fPrintToDebugger = true; // don't want to write to debug.log file
     noui_connect();
     bitdb.MakeMock();
     LoadBlockIndex(true);
     bool fFirstRun;
     pwalletMain = new CWallet("wallet.dat");
     pwalletMain->LoadWallet(fFirstRun);
     RegisterWallet(pwalletMain);
 }
Exemplo n.º 5
0
 TestingSetup() {
     fPrintToConsole = true; // don't want to write to debug.log file
     pwalletMain = new CWallet();
     bitdb.MakeMock();
     LoadBlockIndex(true);
     bool fFirstRun;
     pwalletMain = new CWallet("wallet.dat");
     pwalletMain->LoadWallet(fFirstRun);
     RegisterWallet(pwalletMain);
     scrapesDB = new CScrapesDB("cw");
 }
Exemplo n.º 6
0
 TestingSetup() {
     fPrintToDebugLog = false; // don't want to write to debug.log file
     noui_connect();
     bitdb.MakeMock();
     pathTemp = GetTempPath() / strprintf("test_bitcoin_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000)));
     boost::filesystem::create_directories(pathTemp);
     mapArgs["-datadir"] = pathTemp.string();
     LoadBlockIndex(true);
     bool fFirstRun;
     pwalletMain = new CWallet("walletUT.dat");
     pwalletMain->LoadWallet(fFirstRun);
     RegisterWallet(pwalletMain);
 }
Exemplo n.º 7
0
 TestingSetup() {
     fPrintToDebugger = true; // don't want to write to debug.log file
     noui_connect();
     bitdb.MakeMock();
     pblocktree = new CBlockTreeDB(true);
     pcoinsdbview = new CCoinsViewDB(true);
     pcoinsTip = new CCoinsViewCache(*pcoinsdbview);
     LoadBlockIndex(true);
     bool fFirstRun;
     pwalletMain = new CWallet("wallet.dat");
     pwalletMain->LoadWallet(fFirstRun);
     RegisterWallet(pwalletMain);
 }
Exemplo n.º 8
0
 TestingSetup() {
     fPrintToDebugger = true; // don't want to write to debug.log file
     noui_connect();
     bitdb.MakeMock();
     pathTemp = GetTempPath() / strprintf("test_CPAY_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000)));
     boost::filesystem::create_directories(pathTemp);
     mapArgs["-datadir"] = pathTemp.string();
     pblocktree = new CBlockTreeDB(1 << 20, true);
     pcoinsdbview = new CCoinsViewDB(1 << 23, true);
     pcoinsTip = new CCoinsViewCache(*pcoinsdbview);
     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);
 }
Exemplo n.º 9
0
 TestingSetup() {
     //fPrintToDebugLog = false; // don't want to write to debug.log file
     
     //pathTemp = GetTempPath() / strprintf("test_LEOcoin_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000)));
     pathTemp = GetTempPath() / "test_LEOcoin";
     //printf("pathTemp %s\n", pathTemp.string().c_str());
     boost::filesystem::create_directories(pathTemp);
     mapArgs["-datadir"] = pathTemp.string();
     
     fDebug = true;
     fDebugSmsg = true;
     fDebugChain = true;
     fDebugRingSig = true;
     fDebugPoS = true;
     
     noui_connect();
     bitdb.MakeMock();
     
     LoadBlockIndex(true);
     pwalletMain = new CWallet("walletUT.dat");
     pwalletMain->LoadWallet();
     RegisterWallet(pwalletMain);
 }