Merge 7d14e35f3f into merged_master (Bitcoin PR #17342)

This commit is contained in:
Andrew Poelstra 2020-11-09 23:10:08 +00:00
commit 3f2190d870
5 changed files with 40 additions and 30 deletions

View file

@ -124,9 +124,12 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::string& fedp
throw std::runtime_error(strprintf("ActivateBestChain failed. (%s)", FormatStateMessage(state)));
}
nScriptCheckThreads = 3;
for (int i = 0; i < nScriptCheckThreads - 1; i++)
// Start script-checking threads. Set g_parallel_script_checks to true so they are used.
constexpr int script_check_threads = 2;
for (int i = 0; i < script_check_threads; ++i) {
threadGroup.create_thread([i]() { return ThreadScriptCheck(i); });
}
g_parallel_script_checks = true;
m_node.banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
m_node.connman = MakeUnique<CConnman>(0x1337, 0x1337); // Deterministic randomness for tests.