Merge ae6943620a into merged_master (Bitcoin PR #17407)

This commit is contained in:
Andrew Poelstra 2020-11-09 23:10:14 +00:00
commit fcc3e6c04c
11 changed files with 100 additions and 75 deletions

View file

@ -129,7 +129,6 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::string& fedp
threadGroup.create_thread(std::bind(&CScheduler::serviceQueue, &scheduler));
GetMainSignals().RegisterBackgroundSignalScheduler(scheduler);
mempool.setSanityCheck(1.0);
pblocktree.reset(new CBlockTreeDB(1 << 20, true));
g_chainstate = MakeUnique<CChainState>();
::ChainstateActive().InitCoinsDB(
@ -153,6 +152,8 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::string& fedp
}
g_parallel_script_checks = true;
m_node.mempool = &::mempool;
m_node.mempool->setSanityCheck(1.0);
m_node.banman = MakeUnique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
m_node.connman = MakeUnique<CConnman>(0x1337, 0x1337); // Deterministic randomness for tests.
}
@ -166,6 +167,7 @@ TestingSetup::~TestingSetup()
g_rpc_node = nullptr;
m_node.connman.reset();
m_node.banman.reset();
m_node.mempool = nullptr;
UnloadBlockIndex();
g_chainstate.reset();
pblocktree.reset();