mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge ae6943620a into merged_master (Bitcoin PR #17407)
This commit is contained in:
commit
fcc3e6c04c
11 changed files with 100 additions and 75 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue