Changeset View
Changeset View
Standalone View
Standalone View
src/test/test_bitcoin.cpp
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | if (!LoadGenesisBlock(chainparams)) { | ||||
FormatStateMessage(state))); | FormatStateMessage(state))); | ||||
} | } | ||||
} | } | ||||
nScriptCheckThreads = 3; | nScriptCheckThreads = 3; | ||||
for (int i = 0; i < nScriptCheckThreads - 1; i++) { | for (int i = 0; i < nScriptCheckThreads - 1; i++) { | ||||
threadGroup.create_thread(&ThreadScriptCheck); | threadGroup.create_thread(&ThreadScriptCheck); | ||||
} | } | ||||
g_banman = std::make_unique<BanMan>(chainparams, nullptr); | g_banman = std::make_unique<BanMan>(GetDataDir() / "banlist.dat", | ||||
chainparams, nullptr); | |||||
// Deterministic randomness for tests. | // Deterministic randomness for tests. | ||||
g_connman = std::make_unique<CConnman>(config, 0x1337, 0x1337); | g_connman = std::make_unique<CConnman>(config, 0x1337, 0x1337); | ||||
} | } | ||||
TestingSetup::~TestingSetup() { | TestingSetup::~TestingSetup() { | ||||
threadGroup.interrupt_all(); | threadGroup.interrupt_all(); | ||||
threadGroup.join_all(); | threadGroup.join_all(); | ||||
GetMainSignals().FlushBackgroundCallbacks(); | GetMainSignals().FlushBackgroundCallbacks(); | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |