[addrman] Add deterministic argument to CAddrMan ctor

Removes the need for tests to update nKey and insecure_rand after constructing
a CAddrMan.
This commit is contained in:
John Newbery
2021-07-23 10:48:34 +01:00
parent ee458d84fc
commit fa9710f62c
10 changed files with 31 additions and 43 deletions

View File

@@ -1164,7 +1164,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
const bool ignores_incoming_txs{args.GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)};
assert(!node.addrman);
node.addrman = std::make_unique<CAddrMan>();
node.addrman = std::make_unique<CAddrMan>(/* deterministic */ false);
assert(!node.banman);
node.banman = std::make_unique<BanMan>(gArgs.GetDataDirNet() / "banlist", &uiInterface, args.GetArg("-bantime", DEFAULT_MISBEHAVING_BANTIME));
assert(!node.connman);