mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge 505ba39665 into merged_master (Bitcoin PR bitcoin/bitcoin#22910)
This commit is contained in:
commit
7ad79475b5
24 changed files with 370 additions and 302 deletions
|
|
@ -204,6 +204,7 @@ ChainTestingSetup::~ChainTestingSetup()
|
|||
m_node.connman.reset();
|
||||
m_node.banman.reset();
|
||||
m_node.addrman.reset();
|
||||
m_node.netgroupman.reset();
|
||||
m_node.args = nullptr;
|
||||
WITH_LOCK(::cs_main, UnloadBlockIndex(m_node.mempool.get(), *m_node.chainman));
|
||||
m_node.mempool.reset();
|
||||
|
|
@ -247,11 +248,12 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::string& fedp
|
|||
throw std::runtime_error(strprintf("ActivateBestChain failed. (%s)", state.ToString()));
|
||||
}
|
||||
|
||||
m_node.addrman = std::make_unique<AddrMan>(/*asmap=*/std::vector<bool>(),
|
||||
m_node.netgroupman = std::make_unique<NetGroupManager>(/*asmap=*/std::vector<bool>());
|
||||
m_node.addrman = std::make_unique<AddrMan>(*m_node.netgroupman,
|
||||
/*deterministic=*/false,
|
||||
m_node.args->GetIntArg("-checkaddrman", 0));
|
||||
m_node.banman = std::make_unique<BanMan>(m_args.GetDataDirBase() / "banlist", nullptr, DEFAULT_MISBEHAVING_BANTIME);
|
||||
m_node.connman = std::make_unique<ConnmanTestMsg>(0x1337, 0x1337, *m_node.addrman); // Deterministic randomness for tests.
|
||||
m_node.connman = std::make_unique<ConnmanTestMsg>(0x1337, 0x1337, *m_node.addrman, *m_node.netgroupman); // Deterministic randomness for tests.
|
||||
m_node.peerman = PeerManager::make(chainparams, *m_node.connman, *m_node.addrman,
|
||||
m_node.banman.get(), *m_node.chainman,
|
||||
*m_node.mempool, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue