[net] Construct addrman outside connman

node.context owns the CAddrMan. CConnman holds a reference to
the CAddrMan.
This commit is contained in:
John Newbery
2020-10-23 09:34:27 +01:00
parent 3530d5d2d8
commit 1c25adf6d2
8 changed files with 21 additions and 11 deletions

View File

@@ -2351,8 +2351,8 @@ void CConnman::SetNetworkActive(bool active)
uiInterface.NotifyNetworkActiveChanged(fNetworkActive);
}
CConnman::CConnman(uint64_t nSeed0In, uint64_t nSeed1In, bool network_active)
: nSeed0(nSeed0In), nSeed1(nSeed1In)
CConnman::CConnman(uint64_t nSeed0In, uint64_t nSeed1In, CAddrMan& addrman_in, bool network_active)
: addrman(addrman_in), nSeed0(nSeed0In), nSeed1(nSeed1In)
{
SetTryNewOutboundPeer(false);