[refactor] Add CChainParams member to CConnman

This is done in preparation to the next commit, but has the nice
effect of removing one further data structure relying on the global
`Params()`.
This commit is contained in:
TheCharlatan
2023-09-12 13:42:36 +02:00
parent f0d1d8b35c
commit 2b08c55f01
6 changed files with 19 additions and 14 deletions

View File

@@ -1223,7 +1223,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
assert(!node.connman);
node.connman = std::make_unique<CConnman>(GetRand<uint64_t>(),
GetRand<uint64_t>(),
*node.addrman, *node.netgroupman, args.GetBoolArg("-networkactive", true));
*node.addrman, *node.netgroupman, chainparams, args.GetBoolArg("-networkactive", true));
assert(!node.fee_estimator);
// Don't initialize fee estimation with old data if we don't relay transactions,