diff options
author | Larry Ruane <larryruane@gmail.com> | 2021-07-28 16:18:53 -0600 |
---|---|---|
committer | Larry Ruane <larryruane@gmail.com> | 2021-07-30 16:34:09 -0600 |
commit | 703b1e612a4bd4521e20ae21eb8fb7c19f4ef942 (patch) | |
tree | b51b0648990daf22ce59322f9b6abcf64619d6e3 /src/test/util | |
parent | 4b1fb50def0dea0cd320bc43c12d9a12edde0390 (diff) |
Close minor startup race between main and scheduler threads
Don't schedule class PeerManagerImpl's background tasks from its
constructor, but instead do that from a separate method,
StartScheduledTasks(), that can be called later at the end of startup,
after other things, such as the active chain, are initialzed.
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/setup_common.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index 5334c4623e..2d044af184 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -197,7 +197,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const m_node.banman = std::make_unique<BanMan>(m_args.GetDataDirBase() / "banlist", nullptr, DEFAULT_MISBEHAVING_BANTIME); m_node.connman = std::make_unique<CConnman>(0x1337, 0x1337, *m_node.addrman); // Deterministic randomness for tests. m_node.peerman = PeerManager::make(chainparams, *m_node.connman, *m_node.addrman, - m_node.banman.get(), *m_node.scheduler, *m_node.chainman, + m_node.banman.get(), *m_node.chainman, *m_node.mempool, false); { CConnman::Options options; |