mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
[net] Construct addrman outside connman
node.context owns the CAddrMan. CConnman holds a reference to the CAddrMan.
This commit is contained in:
@@ -856,7 +856,7 @@ public:
|
||||
m_onion_binds = connOptions.onion_binds;
|
||||
}
|
||||
|
||||
CConnman(uint64_t seed0, uint64_t seed1, bool network_active = true);
|
||||
CConnman(uint64_t seed0, uint64_t seed1, CAddrMan& addrman, bool network_active = true);
|
||||
~CConnman();
|
||||
bool Start(CScheduler& scheduler, const Options& options);
|
||||
|
||||
@@ -1130,7 +1130,7 @@ private:
|
||||
std::vector<ListenSocket> vhListenSocket;
|
||||
std::atomic<bool> fNetworkActive{true};
|
||||
bool fAddressesInitialized{false};
|
||||
CAddrMan addrman;
|
||||
CAddrMan& addrman;
|
||||
std::deque<std::string> m_addr_fetches GUARDED_BY(m_addr_fetches_mutex);
|
||||
RecursiveMutex m_addr_fetches_mutex;
|
||||
std::vector<std::string> vAddedNodes GUARDED_BY(cs_vAddedNodes);
|
||||
|
||||
Reference in New Issue
Block a user