diff options
author | John Newbery <john@johnnewbery.com> | 2021-07-23 10:48:34 +0100 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2021-08-05 17:10:30 +0100 |
commit | fa9710f62c29c7f8d71c9f281001c9b5e70946bf (patch) | |
tree | 25117f2104f8d4a848e3760f3d02f76cef828faa /src/test/util/setup_common.cpp | |
parent | ee458d84fc187d69f002ebead6fccc4f4f9c0744 (diff) | |
download | bitcoin-fa9710f62c29c7f8d71c9f281001c9b5e70946bf.tar.xz |
[addrman] Add deterministic argument to CAddrMan ctor
Removes the need for tests to update nKey and insecure_rand after constructing
a CAddrMan.
Diffstat (limited to 'src/test/util/setup_common.cpp')
-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 2d044af184..b1567d924b 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -193,7 +193,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const throw std::runtime_error(strprintf("ActivateBestChain failed. (%s)", state.ToString())); } - m_node.addrman = std::make_unique<CAddrMan>(); + m_node.addrman = std::make_unique<CAddrMan>(/* deterministic */ false); 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, |